| 
	
 | 
 Posted by triciam on 11/06/05 02:37 
"" wrote: 
 > select customers.customerid, customers.country, 
 > orders.orderid, orders.orderdate, orderdetails. sum(unitprice) 
 > as 
 > TotalSales 
 > from customers, orderdetails --Leave this guy away as you are 
 > already 
 > using it in the Join syntax 
 > /*There is no relationaship in a join syntax with 
 > orderdetails, as this 
 > is Order id, add the following: 
 > Inner Join orderdetails on Oderdetails.orderId = 
 > orders.orderid 
 > */ 
 > left join orders on customers.customerid = orders.customerid 
 > where orderdate > '11/1/4' 
 > and country <> 'USA' 
 > and unitprice > 0 
 > and orderid > 346544 
 > group by orderid  
 > order by orderid  
 >  
 >  
 > HTH, Jens Suessmeyer. 
 
Thank you...... 
 
--  
Posted using the http://www.dbforumz.com interface, at author's request 
Articles individually checked for conformance to usenet standards 
Topic URL: http://www.dbforumz.com/SQL-help-ftopict267876.html  
Visit Topic URL to contact author (reg. req'd).  Report abuse: http://www.dbforumz.com/eform.php?p=924664
 
[Back to original message] 
 |