【发布时间】:2020-01-29 22:41:50
【问题描述】:
我进行了一项调查,其中有一些必须选择的领域。例如:工作场所、工作年限和满意度。
tlDetail
SurveyId QuestionId ChoiceId
1 1 1
1 2 5
1 3 7
2 1 3
2 2 6
2 3 8
tblquestion
QuestionId Question
1 Question 1
2 Question 2
3 Question 3
TblChoice
ChoiceId QuestionId ChoiceName
1 1 HR
2 1 Accountant
3 1 Teacher
4 2 >10 years
5 2 <10 years
6 2 =10 years
7 3 satisfies
8 3 not satisfied
9 3 no comment
我需要编写一个查询,告诉我有多少教师 =10 年并且满意
【问题讨论】:
标签: sql sql-server join count