Query to get count by data
Hello. In microsoft sql server,I have 3 tables, "Hotel", "Mood" and "Feedback
Hotel :- Id, Name
Mood :- Id, Name
Feedback : Id, HotelId, MoodId, FeedbackText
In Hotel, there are 2 records. (Hotel1, Hotel2)
In Mood, there are 3 records (Happy, Unhappy, Neutral)
Feedback is actual transaction table.
So, I want out put like,
Headers :- Hotel, Happy, Unhappy, Neutral
Record1 :- Hotel1, 12, 5, 2
Record1 :- Hotel2, 22, 3, 1
Please help me to write this query.