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.
[
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
Post a Comment