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...)
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...)