ms access - sql using Count(*) function -


i using microsoft access 2013 , i'm trying find number of orders in each cafe number shown wrong. code:

select avg(feedback.ratingforexperience) caferating,       count(tblorder_product.productcode) cafesales, feedback.cafeid tblorder_product, feedback group feedback.cafeid; 

please me, thank you.

enter image description here screen1

[]

as mentioned in comments, need join tables together. below sql.

select avg(feedback.ratingforexperience) caferating,   count(tblorder_product.productcode) cafesales, feedback.cafeid tblorder_product inner join feedback on tblorder_product.ordercode = feedback.ordercode group feedback.cafeid; 

or

select avg(feedback.ratingforexperience) caferating,   count(tblorder_product.productcode) cafesales, feedback.cafeid tblorder_product left join feedback on tblorder_product.ordercode = feedback.ordercode group feedback.cafeid; 

Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -