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 ~ comunicazione digitale > Nius progetto Catering
Pages (3): « 1 [2] 3 »   Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
el-mundo
.grande:maestro.

User info:
Registered: Oct 2005
Posts: 561 (0.08 al dì)
Location: milano
Corso: comunicazione digitale
Anno:
Time Online: 2 Days, 9:27:52 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

guarda...nn so com'è il tuo ER ma la ns è parecchio "impestata" con 2 sottointerrogazioni!!

20-11-2008 16:25
Click Here to See the Profile for el-mundo Click here to Send el-mundo a Private Message Find more posts by el-mundo Add el-mundo to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
annared
.primate.

User info:
Registered: Dec 2007
Posts: 60 (0.01 al dì)
Location: tra Milano e la provincia di Brescia
Corso: Comunicazione digitale
Anno: Terzo ?
Time Online: 1 Day, 0:46:01: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

noi l'abbiamo fatta così:

SELECT bevanda.idBevanda, nome, zonaOrigine, dop from bevanda NATURAL JOIN vino natural join consigliato
group by bevanda.idbevanda, nome, zonaorigine, dop
having count(idbevanda) >= all (select count(idbevanda) from consigliato group by idbevanda)


spero ti sia utile

20-11-2008 17:21
Click Here to See the Profile for annared Click here to Send annared a Private Message Find more posts by annared Add annared to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
el-mundo
.grande:maestro.

User info:
Registered: Oct 2005
Posts: 561 (0.08 al dì)
Location: milano
Corso: comunicazione digitale
Anno:
Time Online: 2 Days, 9:27:52 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

scusate ma chi è che deve consegnare il cartaceo prima?
Questa cosa nn l'ho capita.

21-11-2008 14:06
Click Here to See the Profile for el-mundo Click here to Send el-mundo a Private Message Find more posts by el-mundo Add el-mundo to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
stell4r
.consigliere.

User info:
Registered: Nov 2007
Posts: 107 (0.02 al dì)
Location:
Corso:
Anno:
Time Online: 13:26:51 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by annared
noi l'abbiamo fatta così:

SELECT bevanda.idBevanda, nome, zonaOrigine, dop from bevanda NATURAL JOIN vino natural join consigliato
group by bevanda.idbevanda, nome, zonaorigine, dop
having count(idbevanda) >= all (select count(idbevanda) from consigliato group by idbevanda)


spero ti sia utile


grazie mille. Ora me la studio per bene :)

annared hai msn? se si mandami un pm con il tuo contatto che ti aggiungo :)

21-11-2008 15:29
Click Here to See the Profile for stell4r Click here to Send stell4r a Private Message Find more posts by stell4r Add stell4r to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
bobighorus
.illuminato.

User info:
Registered: Oct 2004
Posts: 167 (0.02 al dì)
Location:
Corso: Comunicazione Digitale
Anno: dr.
Time Online: 1 Day, 3:50:36 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
Thumbs up

Originally posted by stell4r
ragà vi espongo un dubbio. Sono 2 giorni che sto su una maledetta query. Per me è giusta per mesiti no.

SELECT count(piatto.nomev) as numeroconsigliato, vini.nomev as nomevino
FROM piatto,vini
WHERE vini.nomev=piatto.nomev
GROUP BY piatto.nomev, vini.nomev
ORDER BY numeroconsigliato DESC

si parla della query e. (individuare il vino che si sposa bene con il maggior numero di piatti;)

Praticamente lui afferma che con desc non riesco ad ottenere quello che voglio. In effetti se compilo invece di uscire il MAGGIOR numero di volte, escono tutti i risultati. Cosa sbaglio?


Ciao stell4r.
La tua query è giusta tranne che per una cosa.
Praticamente la tua idea è: prendere tutti i risultati, ordinarli per numero discendente e prendere solo il primo; il problema - come ti ha spiegato Mesiti- è che la query che hai scritto ritorna TUTTI i risultati, mentre a te interessa solo il primo.
Puoi aggiustarla semplicemente inserendo alla fine "LIMIT 1", che ritorna solo il primo risultato!
Spero di esserti stato utile! :)
p.s.: come esempio di query sql non è che sia "bellissima"; nel senso che è un po' un troskino, anche se funziona!
questo è un mio parere che non conta nulla, però sai mi è parso giusto dirtelo dato che i proff. sono molto esigenti! ;)

Last edited by bobighorus on 24-11-2008 at 08:58

24-11-2008 08:55
Click Here to See the Profile for bobighorus Click here to Send bobighorus a Private Message Find more posts by bobighorus Add bobighorus to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
stell4r
.consigliere.

User info:
Registered: Nov 2007
Posts: 107 (0.02 al dì)
Location:
Corso:
Anno:
Time Online: 13:26:51 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

ciao bobighorus. Grazie per avermi risposto. Il limit a mesiti non piace (l'ho usato in un'altra query e mi è stato detto di cambiarla). Si purtroppo essendo solo non riesco a confrontarmi con nessuno e mi rendo conto che non è il massimo come resa per le query. :D

cmq grazie ancora. ti mando il mio msn in pm . se ce l hai aggiungimi ^_^

24-11-2008 09:05
Click Here to See the Profile for stell4r Click here to Send stell4r a Private Message Find more posts by stell4r Add stell4r to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Acaso
.consigliere.

User info:
Registered: Jan 2006
Posts: 115 (0.02 al dì)
Location:
Corso: Comunicazione Digitale
Anno: Terzo
Time Online: 1 Day, 3:50:34 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Scusate ragazzi, ma non mi è chiara una cosa. Il 28 dobbiamo consegnare la documentazione cartacea del vecchio elaborato, ma che senso ha?


* entro venerdì 28 novembre ore 17 consegna cartacea del precedente elaborato
* entro domenica 30 novembre ore 24 sottomissione via mail della documentazione al rispettivo docente di riferimento


Poi parla solo della documentazione.
Qualcuno ha capito cosa bisogna fare?

24-11-2008 09:13
Click Here to See the Profile for Acaso Click here to Send Acaso a Private Message Find more posts by Acaso Add Acaso to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
bobighorus
.illuminato.

User info:
Registered: Oct 2004
Posts: 167 (0.02 al dì)
Location:
Corso: Comunicazione Digitale
Anno: dr.
Time Online: 1 Day, 3:50:36 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

guarda anch'io non è che ci abbia poi capito molto su sta storia della doc cartacea...

24-11-2008 09:28
Click Here to See the Profile for bobighorus Click here to Send bobighorus a Private Message Find more posts by bobighorus Add bobighorus to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
WillyWonka
.consigliere.

User info:
Registered: Oct 2005
Posts: 142 (0.02 al dì)
Location: Desio
Corso: COM DIG
Anno: terzo
Time Online: 1 Day, 13:17:44 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

se per caso al primo appello vi siete fatti lasciare la documentazione da loro stampata e corretta, per ricordarsi poi degli errori a casa, entro il 28 dovete riportargliela..tutto qui.

24-11-2008 10:33
Click Here to See the Profile for WillyWonka Click Here to See the Blog of WillyWonka Click here to Send WillyWonka a Private Message Find more posts by WillyWonka Add WillyWonka to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Acaso
.consigliere.

User info:
Registered: Jan 2006
Posts: 115 (0.02 al dì)
Location:
Corso: Comunicazione Digitale
Anno: Terzo
Time Online: 1 Day, 3:50:34 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Grazie!!A noi non l'ha voluta lasciare....

24-11-2008 10:41
Click Here to See the Profile for Acaso Click here to Send Acaso a Private Message Find more posts by Acaso Add Acaso to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
el-mundo
.grande:maestro.

User info:
Registered: Oct 2005
Posts: 561 (0.08 al dì)
Location: milano
Corso: comunicazione digitale
Anno:
Time Online: 2 Days, 9:27:52 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by stell4r
ciao bobighorus. Grazie per avermi risposto. Il limit a mesiti non piace (l'ho usato in un'altra query e mi è stato detto di cambiarla). Si purtroppo essendo solo non riesco a confrontarmi con nessuno e mi rendo conto che non è il massimo come resa per le query. :D

cmq grazie ancora. ti mando il mio msn in pm . se ce l hai aggiungimi ^_^


A Mesiti non piace il LImit. A Mesiti non piace From ( select.....
A Mesiti non piacciono le operazioni tipo TIme Extract ecc ecc.
A Mesiti non piacciono un sacco di cose che funzionano e che sopratutto i libri e internet ne sono pieni!Ma che senso ha?
BOH!!!!

24-11-2008 11:46
Click Here to See the Profile for el-mundo Click here to Send el-mundo a Private Message Find more posts by el-mundo Add el-mundo to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
stell4r
.consigliere.

User info:
Registered: Nov 2007
Posts: 107 (0.02 al dì)
Location:
Corso:
Anno:
Time Online: 13:26:51 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

a me non piace lui... decisamente!!!

24-11-2008 13:08
Click Here to See the Profile for stell4r Click here to Send stell4r a Private Message Find more posts by stell4r Add stell4r to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
bobighorus
.illuminato.

User info:
Registered: Oct 2004
Posts: 167 (0.02 al dì)
Location:
Corso: Comunicazione Digitale
Anno: dr.
Time Online: 1 Day, 3:50:36 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by stell4r
ciao bobighorus. Grazie per avermi risposto. Il limit a mesiti non piace (l'ho usato in un'altra query e mi è stato detto di cambiarla). Si purtroppo essendo solo non riesco a confrontarmi con nessuno e mi rendo conto che non è il massimo come resa per le query. :D

cmq grazie ancora. ti mando il mio msn in pm . se ce l hai aggiungimi ^_^

Ciao!
Mi dispiace non esserti stato d'aiuto! :)
Guarda MSN ce l'ho ma sono mesi che non lo apro perchè sono di giorno sono al lavoro e di sera...se mi attacco a msn non faccio più niente! :D
Quindi ti dò la mia mail in pm se ti serve che rispondo sicuramente! :)
Comunque io sto facendo il progetto della palestra, quello da non frequentanti...

24-11-2008 13:39
Click Here to See the Profile for bobighorus Click here to Send bobighorus a Private Message Find more posts by bobighorus Add bobighorus to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
karplus
.grande:maestro.

User info:
Registered: Jun 2004
Posts: 1207 (0.15 al dì)
Location:
Corso: Informatica per la Comunicazione (magistrale)
Anno:
Time Online: 7 Days, 2:28:19 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by bobighorus

Puoi aggiustarla semplicemente inserendo alla fine "LIMIT 1", che ritorna solo il primo risultato!


ASSOLUTAMENTE NON FATELO, NON USATE LIMIT 1!!!

L'avevamo usato in una query e ce l'ha segnato in super-rosso alla precedente discussione, non usate limit 1 o vi considerano cannata la query come hanno fatto con noi. A noi l'aveva corretto valtolina ma leggo che anche mesiti odia sto limit 1...

Originally posted by el-mundo

A Mesiti non piacciono le operazioni tipo TIme Extract ecc ecc.


Mail di Valtolina alla mano, gli ho chiesto apposta se time extract si poteva usare e mi ha detto di si. Anche perchè ho chiesto nel forum ufficiale di postgresql come potevo fare la query della liquidazione senza time extract, date_parte ecc e il mod mi ha risposto che non c'è altro modo. :twisted:

25-11-2008 13:23
Click Here to See the Profile for karplus Click here to Send karplus a Private Message Find more posts by karplus Add karplus to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
nene
.amico.

User info:
Registered: Oct 2005
Posts: 39 (0.01 al dì)
Location: milano
Corso: comunicazione digitale
Anno: 2
Time Online: 1 Day, 23:15:41 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

ma....quindi...nada limit????
e una funzione che fa la stessa cosa ma che gli va bene c'è?

26-11-2008 10:46
Click Here to See the Profile for nene Click here to Send nene a Private Message Find more posts by nene Add nene 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:52.    Post New Thread    Post A Reply
Pages (3): « 1 [2] 3 »   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.083 seconds (71.50% PHP - 28.50% MySQL) con 24 query.