Hi everyone,
I have a question on the TSQL Syntax.
Now, I have 2 table which is Service & Rating:
Service:

Rating:

As you can see, the Rating_Id in the Rating table has many Services_Id values = 1
Now I want to get the Average Rating Score and display on the webpage, the TSQL that I tried:
- SELECT AVG(r.Score),s.*
- FROM Services s
- FULL OUTER JOIN Rating r ON r.Services_Id = s.Services_Id
- GROUP BY s.Services_id, r.Services_Id
How can I achieve that
Please help
Thank you

Amit GuptaRank #190 · 12.8K reputationPosted Jan 29, 2021, 5:53 AM EST
Amit GuptaRank #190 · 12.8K reputationPosted Jan 28, 2021, 11:55 PM EST
Amit GuptaRank #190 · 12.8K reputationPosted Jan 29, 2021, 5:33 AM EST
Laxmidhar SahooRank #383 · 6.6K reputationPosted Jan 28, 2021, 3:01 PM EST
Yong Kevin55 reputationPosted Jan 28, 2021, 7:37 PM EST
Yong Kevin55 reputationPosted Jan 29, 2021, 1:13 AM EST
Yong Kevin55 reputationPosted Jan 29, 2021, 5:55 AM EST
satheesh d190 reputationPosted Oct 30, 2021, 7:38 AM EDT