Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 sql query help

Author  Topic 

ahmadsa
Starting Member

7 Posts

Posted - 2007-12-12 : 14:13:48
ORDNO LINE_CATPROD_NO QTY PRICE
0001 1 P001 2 18.99
0001 3 P007 3 15.15
0002 2 P003 4 24.42
0003 1 P005 5 75.15
0003 3 P002 6 10.02
0004 2 P004 7 1.84
0005 1 P001 8 36.45
0005 2 P010 3 3.99
0005 3 P009 2 13.28
0006 1 P007 4 5.60
0006 1 P006 2 0.75
0006 2 P001 10 58.05


Using the ORDER_LINE table, write a SQL query to list for each product number, the Total Quantity and the Average Price for all orders. Round the Average Price to the nearest pound and name the columns headings appropriately.


can anybody help me with this please i have been trying to figure this out but no luck thanx

X002548
Not Just a Number

15586 Posts

Posted - 2007-12-12 : 14:18:06
Did you ask your teacher's assistant?



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

ahmadsa
Starting Member

7 Posts

Posted - 2007-12-12 : 14:23:54
i am just going throught my notes and found some questions as apart of an old exercise
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-12-12 : 20:38:54
what have you tried ?


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-12-13 : 00:59:05
Learn SQL
http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -