Re: Counting things with SQL
- From: "Andrew Morton" <akm@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 15 Apr 2005 16:45:37 +0100
"Jens Süßmeyer" wrote
> Here is an example for the Northwind database, can be easely compared to
> your database with the right key associated.
>
> Select O.OrderID,Count(*) from Orders O
> Inner join [Order Details] OD
> On O.OrderID = OD.OrderID
> Group by O.OrderIDa
Thanks for that - is the next line meant to be included in the script
somehow?
Is it intended to modify the above query to return only the largest value?
> Count All Orders Group by the OrderID
[Also, is the Northwind database available to those of us who only have MSDE
to experiment with? So many Microsoft examples use it, but without it it can
be hard to follow the examples.]
Andrew
.
- Follow-Ups:
- Re: Counting things with SQL
- From: Jens Süßmeyer
- Re: Counting things with SQL
- References:
- Counting things with SQL
- From: Andrew Morton
- Re: Counting things with SQL
- From: Jens Süßmeyer
- Counting things with SQL
- Prev by Date: Re: I need help with SELECT statement
- Next by Date: Re: Counting things with SQL
- Previous by thread: Re: Counting things with SQL
- Next by thread: Re: Counting things with SQL
- Index(es):
Relevant Pages
|