dbTalk Databases Forums  

contare i clienti

comp.databases.ms-access comp.databases.ms-access


Discuss contare i clienti in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
remigio
 
Posts: n/a

Default contare i clienti - 10-06-2010 , 10:57 AM






Ciao,
forse per voi sarą una cosa banale ma io non riesco.
Ho due tabelle, clienti e ordini (un classico):

clienti:
id_cliente, cognome, nome

ordini:
id_ordini, merce, quantitą

vorrei sapere quanti sono i clienti che hanno fatto almeno un ordine,
dato che non tutti lo hanno fatto.
Mi dareste un input per favore?
Ciao e grazie.

Remigio

Reply With Quote
  #2  
Old   
James A. Fortune
 
Posts: n/a

Default Re: contare i clienti - 10-08-2010 , 02:38 AM






On Oct 6, 11:57*am, remigio <linore... (AT) gmail (DOT) com> wrote:
Quote:
Ciao,
forse per voi sarą una cosa banale ma io non riesco.
Ho due tabelle, clienti e ordini (un classico):

clienti:
id_cliente, cognome, nome

ordini:
id_ordini, merce, quantitą

vorrei sapere quanti sono i clienti che hanno fatto almeno un ordine,
dato che non tutti lo hanno fatto.
Mi dareste un input per favore?
Ciao e grazie.

Remigio
Translation from http://translate.google.com:

Hello,
perhaps you will be a trivial thing but I can not.
I have two tables, customers and orders (a classic):

customers:
Customer_ID, surname, name

orders:
id_ordini, commodity, quantity

I would like to know how many customers who have made at least one
order, since not all did. You give me input please? Hello and thank
you.

Risposta (Answer):

Avete bisogno di (you need):

clientes:
Customer_ID, surname, name

ordines:
id_ordini, commodity, quantity, Customer_ID

SQL:

SELECT Customer_ID, [name] FROM clientes WHERE Customer_ID IN (SELECT
Customer_ID FROM ordines);

o

SELECT Customer_ID, [name] FROM clientes WHERE Customer_ID IN (SELECT
Customer_ID FROM ordines WHERE OrdineDiData BETWEEN #2010-8-1# AND
#2010-8-31#) ORDER BY [name];

James A. Fortune
CDMAPoster (AT) FortuneJames (DOT) com

Reply With Quote
  #3  
Old   
remigio
 
Posts: n/a

Default Re: contare i clienti - 10-09-2010 , 09:25 AM



On 8 Ott, 09:38, "James A. Fortune" <CDMAPos... (AT) FortuneJames (DOT) com>
wrote:
Quote:
On Oct 6, 11:57*am, remigio <linore... (AT) gmail (DOT) com> wrote:



Ciao,
forse per voi sarą una cosa banale ma io non riesco.
Ho due tabelle, clienti e ordini (un classico):

clienti:
id_cliente, cognome, nome

ordini:
id_ordini, merce, quantitą

vorrei sapere quanti sono i clienti che hanno fatto almeno un ordine,
dato che non tutti lo hanno fatto.
Mi dareste un input per favore?
Ciao e grazie.

Remigio

Translation fromhttp://translate.google.com:

Hello,
perhaps you will be a trivial thing but I can not.
I have two tables, customers and orders (a classic):

customers:
Customer_ID, surname, name

orders:
id_ordini, commodity, quantity

I would like to know how many customers who have made at least one
order, since not all did. *You give me input please? *Hello and thank
you.

Risposta (Answer):

Avete bisogno di (you need):

clientes:
Customer_ID, surname, name

ordines:
id_ordini, commodity, quantity, Customer_ID

SQL:

SELECT Customer_ID, [name] FROM clientes WHERE Customer_ID IN (SELECT
Customer_ID FROM ordines);

o

SELECT Customer_ID, [name] FROM clientes WHERE Customer_ID IN (SELECT
Customer_ID FROM ordines WHERE OrdineDiData BETWEEN #2010-8-1# AND
#2010-8-31#) ORDER BY [name];

James A. Fortune
CDMAPos... (AT) FortuneJames (DOT) com
Thank you very much

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.