Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

i am lost

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I am trying to learn sql... But i feel desperate because i cannot do even the easiest things... Could somone tell me how I can write the following script???

Thanks,

Jenny
-----------------------------------------------------------

Create a series of T-SQL scripts as outlined below. Save each script with the name given. Each script will contain T-SQL code to perform the requirements described, as well as produce the output indicated.

Script # 1 (nwind_avg.sql)

Use the Northwind database (customers & orders tables)
Determine the total number of customers
Determine the total number of orders
Display a message indicating the total number of orders
Calculate the average number of orders per customer
Display a message indicating the average number of orders per customer
Outputs the following:

Using the Northwind database on server JETTY to produce the following results...
Total customers: 91
Total orders: 830
Average orders per customer: 9

Note: In the above output message (line 1) the server name "JETTY" should be the name of YOUR server, not just a string literal.
(e.g. ...database on server name SQLCLASS14 to produce the following results...)

 
Interesting problem. Just out of curiousity, where do you go to school, and what is the course name and segment?
 
Jenny,

Don't just cut and paste your assignments, it's a bit obvious...

If you want help with a particular point you don't understand then that's fine -- but we won't do your assignments for you.

Mike
michael.j.lacey@ntlworld.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top