Dsy Network www | forum | my | didattica | howto | wiki | el goog | stats | blog | dona | rappresentanti
Homepage
 Register   Calendar   Members  Faq   Search  Logout 
.dsy:it. : Powered by vBulletin version 2.3.1 .dsy:it. > Didattica > Corsi A - F > Basi di dati ~ informatica triennale > [CASTANO] Primo Compitino 05/06
Pages (11): « 1 2 [3] 4 5 6 7 » ... Last »   Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
queen
.amico.

User info:
Registered: Mar 2005
Posts: 38 (0.00 al dì)
Location: milano
Corso: Informatica
Anno: 2
Time Online: 19:58:41 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
la mia soluzione

ecco la mia soluzione:

P nomefiume,lungh(((P lungh,nomeF(FIUME) JOIN nomeF=fiume
(P fiume,Centro ( S centro=Piemonte(ATTRAVERSAMENTI))))

intersecato


uguale con centro=lombardia.


ciao a tutti

chiedo se è giusta.......

07-11-2005 20:11
Click Here to See the Profile for queen Click here to Send queen a Private Message Find more posts by queen Add queen to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Logan12584
Il più grande dei grandi

User info:
Registered: Nov 2003
Posts: 514 (0.06 al dì)
Location: The House of the Dead
Corso: I telecomunicazionisti conquisteranno il mondo
Anno: P(X>=2+1|X>2)
Time Online: 2 Days, 0:04:21 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

è sbagliata, nomec identifica la città non la regione che è dentro centro-->regione manca un collegamento a centro :)

__________________
Scompaio e di me solo fievoli ricordi affolleranno la mente delle genti conosciute,sarò fantasma e vagherò nelle terre di nessuno, finché l ultimo ricordo morrà insieme con il mio spirito...
Se non si è disposti a rivivere la propria vita, perché darsi la pena di viverla adesso ?
Youtube.it

07-11-2005 20:28
Click Here to See the Profile for Logan12584 Click here to Send Logan12584 a Private Message Find more posts by Logan12584 Add Logan12584 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
de_luna
.arcimaestro.

User info:
Registered: Oct 2003
Posts: 441 (0.05 al dì)
Location: Prov. Milano
Corso: informatica
Anno: 3 (più o meno)
Time Online: 4 Days, 16:57:44 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Qualcuno ha fatto questa query?
Perchè on line ci sono gli appelli scorsi ma senza soluzioni.
Grazie ciao ciao

MACCHINISTA (CF, Nome, Cognome, Età)
TRENO (ID-treno, Tipo(ES/IC/IR/D), Lunghezza, Ristorante(S/N))
PERCORRENZA (CF, ID-treno, Nome-linea, Nr-fermate)

2. determinare il CF dei macchinisti che percorrono il maggior numero di linee diverse;

08-11-2005 09:59
Click Here to See the Profile for de_luna Click here to Send de_luna a Private Message Find more posts by de_luna Add de_luna to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
puntozip
.arcimaestro.

User info:
Registered: Jan 2003
Posts: 332 (0.04 al dì)
Location: milano
Corso: Ticom
Anno: 1
Time Online: 10 Days, 4:57:16 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

potrebbe funzionare con una vista?

create view MacchinistiPerLinea (cf, totLinee) as
select cf , count (distinct Nome-linea )
from PERCORRENZA
group by cf

select cf
from MacchinistiPerLinea
where totLinee >= all (select max(totLinee)
from MacchinistiPerLinea)

__________________
There are two ways of constructing a software design:
one way is to make it so simple that there are obviously no deficiencies;
the other way is to make it so complicated that there are no obvious deficiencies.
(C.A.R. Hoare)

08-11-2005 10:35
Click Here to See the Profile for puntozip Click here to Send puntozip a Private Message Find more posts by puntozip Add puntozip to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
puntozip
.arcimaestro.

User info:
Registered: Jan 2003
Posts: 332 (0.04 al dì)
Location: milano
Corso: Ticom
Anno: 1
Time Online: 10 Days, 4:57:16 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Imprecisione: se uso max non mi serve >= e viceversa...

__________________
There are two ways of constructing a software design:
one way is to make it so simple that there are obviously no deficiencies;
the other way is to make it so complicated that there are no obvious deficiencies.
(C.A.R. Hoare)

08-11-2005 10:56
Click Here to See the Profile for puntozip Click here to Send puntozip a Private Message Find more posts by puntozip Add puntozip to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
tata1283
dottoressa!!!

User info:
Registered: Oct 2002
Posts: 495 (0.06 al dì)
Location: Albino (BG)
Corso: Informatica
Anno: 3
Time Online: 5 Days, 17:07:20 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Ma la disposizione delle aule per domani non è ancora stata messa sul sito?
Qlcn ha qlc notizia a riguardo?

08-11-2005 16:28
Click Here to See the Profile for tata1283 Click here to Send tata1283 a Private Message Find more posts by tata1283 Add tata1283 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Logan12584
Il più grande dei grandi

User info:
Registered: Nov 2003
Posts: 514 (0.06 al dì)
Location: The House of the Dead
Corso: I telecomunicazionisti conquisteranno il mondo
Anno: P(X>=2+1|X>2)
Time Online: 2 Days, 0:04:21 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

potrebbe andare così?

select percorrenza.cf
from percorrenza
where count (distinct nome_linee) >=all
(select count (distinct nome_linee)
from percorrenza
group by percorrenza.cf)

group by percorrenza.cf


ditemi dove ho sbagliato :D

__________________
Scompaio e di me solo fievoli ricordi affolleranno la mente delle genti conosciute,sarò fantasma e vagherò nelle terre di nessuno, finché l ultimo ricordo morrà insieme con il mio spirito...
Se non si è disposti a rivivere la propria vita, perché darsi la pena di viverla adesso ?
Youtube.it

Last edited by Logan12584 on 08-11-2005 at 18:37

08-11-2005 18:29
Click Here to See the Profile for Logan12584 Click here to Send Logan12584 a Private Message Find more posts by Logan12584 Add Logan12584 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
yoruno
.grande:maestro.

User info:
Registered: Jul 2003
Posts: 10602 (1.28 al dì)
Location: Altrove
Corso: 404 error
Anno: 404 error
Time Online: 123 Days, 2:50:08: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

AULE PER DOMANI: colonna a destra qui

__________________
"Voi che tingete i mari del colore dello zinco, che tramutate i boschi in gialli deserti, i venti in fumi di polveri da sparo e che bruciate i cieli. Voi che volete ripetere i malvagi atti della sconsiderata Lilith, che fu la prima moglie di Adamo e poi la sposa del Diavolo. Voi che volete ripetere la ribellione scatenata da Lucifero, del mondo celeste il più splendente. Voi! Ascoltate l'afflizione della sottospecie alata che vola alta nel cielo." [Angel Sanctuary]
::: mail: yoruno@dsy.it ::: ::: My Site ::: ::: Dsy Photo Gallery ::: ::: DeviantART Gallery :::

08-11-2005 18:32
Click Here to See the Profile for yoruno Click Here to See the Blog of yoruno Click here to Send yoruno a Private Message Visit yoruno's homepage! Find more posts by yoruno Add yoruno to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
virtual
Scheggia Impazzita

User info:
Registered: Feb 2004
Posts: 167 (0.02 al dì)
Location: [MI]
Corso: Informatica
Anno: FINITO!
Time Online: 3 Days, 14:30:20 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by de_luna
Qualcuno ha fatto questa query?
determinare il CF dei macchinisti che percorrono il maggior numero di linee diverse;



Io l'ho fatta accussì pero' non sono sicuro:

Select P.CF
from Percorrenza as P
group by P.CF , Nome-Linea
Having count(*) > ALL (Select count(*)
from Percorrenza
group by Percorrenza.CF, Nome-Linea)

__________________
Linux si coltiva... windows si pianta da solo

La prima volta che Adamo vide Eva disse: "Stai lontana cara, questo coso non so quanto cresce!!

09-11-2005 07:57
Click Here to See the Profile for virtual Click here to Send virtual a Private Message Visit virtual's homepage! Find more posts by virtual Add virtual to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Logan12584
Il più grande dei grandi

User info:
Registered: Nov 2003
Posts: 514 (0.06 al dì)
Location: The House of the Dead
Corso: I telecomunicazionisti conquisteranno il mondo
Anno: P(X>=2+1|X>2)
Time Online: 2 Days, 0:04:21 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by virtual
Io l'ho fatta accussì pero' non sono sicuro:

Select P.CF
from Percorrenza as P
group by P.CF , Nome-Linea
Having count(*) > ALL (Select count(*)
from Percorrenza
group by Percorrenza.CF, Nome-Linea)


forse...credo..non so...


Select P.CF
from Percorrenza as P
group by P.CF
Having count(*) > ALL (Select count(distinct *)
from Percorrenza
group by Nome-Linea)

__________________
Scompaio e di me solo fievoli ricordi affolleranno la mente delle genti conosciute,sarò fantasma e vagherò nelle terre di nessuno, finché l ultimo ricordo morrà insieme con il mio spirito...
Se non si è disposti a rivivere la propria vita, perché darsi la pena di viverla adesso ?
Youtube.it

09-11-2005 08:59
Click Here to See the Profile for Logan12584 Click here to Send Logan12584 a Private Message Find more posts by Logan12584 Add Logan12584 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
sansatana84mi
.arcimaestro.

User info:
Registered: Aug 2004
Posts: 336 (0.04 al dì)
Location: cerro maggiore
Corso: T.i.Co
Anno:
Time Online: 3 Days, 12:55:19 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

secondo me l'ultima che avete scritto si; e come la quey di ieri all'esercitazione...cambia il contesto ma la riechiesta è sempre quella...
Soluzione query 3

Determinare identificatore, nome, cognome della persona
che appartiene al maggior numero di gruppi
– RUOLO(id, nome, descrizione)
– GRUPPO(id, nome, finanziamento)
– PERSONA(id, nome, cognome, ruolo)
– APPARTENENZA(id_persona, id_gruppo)

SELECT DISTINCT persona.id, persona.nome,
persona.cognome, COUNT(*) AS Numerogruppi
FROM persona, appartenenza
WHERE persona.id = appartenenza.id_persona
GROUP BY persona.id, persona.nome, persona.cognome
HAVING (COUNT(*) >= ALL (SELECT COUNT(*)
FROM persona, appartenenza
WHERE persona.id = appartenenza.id_persona
GROUP BY persona.id))

09-11-2005 09:00
Click Here to See the Profile for sansatana84mi Click here to Send sansatana84mi a Private Message Find more posts by sansatana84mi Add sansatana84mi to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
de_luna
.arcimaestro.

User info:
Registered: Oct 2003
Posts: 441 (0.05 al dì)
Location: Prov. Milano
Corso: informatica
Anno: 3 (più o meno)
Time Online: 4 Days, 16:57:44 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

grazie mille, credo che l'ultima scritta sia giusta, ma nell'ultimo group by non ci devo mettere anche cf?
come ha fatto vitual?
grazie ciao ciao

09-11-2005 10:25
Click Here to See the Profile for de_luna Click here to Send de_luna a Private Message Find more posts by de_luna Add de_luna to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Logan12584
Il più grande dei grandi

User info:
Registered: Nov 2003
Posts: 514 (0.06 al dì)
Location: The House of the Dead
Corso: I telecomunicazionisti conquisteranno il mondo
Anno: P(X>=2+1|X>2)
Time Online: 2 Days, 0:04:21 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by de_luna
grazie mille, credo che l'ultima scritta sia giusta, ma nell'ultimo group by non ci devo mettere anche cf?
come ha fatto vitual?
grazie ciao ciao


non credo perchè è una selezione interna in cui ti serve calcolare solo il numero di linee per confrontarle con la prima select

__________________
Scompaio e di me solo fievoli ricordi affolleranno la mente delle genti conosciute,sarò fantasma e vagherò nelle terre di nessuno, finché l ultimo ricordo morrà insieme con il mio spirito...
Se non si è disposti a rivivere la propria vita, perché darsi la pena di viverla adesso ?
Youtube.it

09-11-2005 10:31
Click Here to See the Profile for Logan12584 Click here to Send Logan12584 a Private Message Find more posts by Logan12584 Add Logan12584 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
de_luna
.arcimaestro.

User info:
Registered: Oct 2003
Posts: 441 (0.05 al dì)
Location: Prov. Milano
Corso: informatica
Anno: 3 (più o meno)
Time Online: 4 Days, 16:57:44 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

allora posso chiedertene un'altra? l'ho fatta ma non sono sicura!

09-11-2005 10:38
Click Here to See the Profile for de_luna Click here to Send de_luna a Private Message Find more posts by de_luna Add de_luna to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Logan12584
Il più grande dei grandi

User info:
Registered: Nov 2003
Posts: 514 (0.06 al dì)
Location: The House of the Dead
Corso: I telecomunicazionisti conquisteranno il mondo
Anno: P(X>=2+1|X>2)
Time Online: 2 Days, 0:04:21 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

spara :D

__________________
Scompaio e di me solo fievoli ricordi affolleranno la mente delle genti conosciute,sarò fantasma e vagherò nelle terre di nessuno, finché l ultimo ricordo morrà insieme con il mio spirito...
Se non si è disposti a rivivere la propria vita, perché darsi la pena di viverla adesso ?
Youtube.it

09-11-2005 10:48
Click Here to See the Profile for Logan12584 Click here to Send Logan12584 a Private Message Find more posts by Logan12584 Add Logan12584 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 07:51.    Post New Thread    Post A Reply
Pages (11): « 1 2 [3] 4 5 6 7 » ... Last »   Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread | Add to Bookmarks

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is ON
 

Powered by: vBulletin v2.3.1 - Copyright ©2000 - 2002, Jelsoft Enterprises Limited
Mantained by dsy crew (email) | Collabora con noi | Segnalaci un bug | Archive | Regolamento | Licenze | Thanks | Syndacate
Pagina generata in 0.090 seconds (64.22% PHP - 35.78% MySQL) con 24 query.