我有以下表格:Section, Questions, Answers
和QuestionFlagged
。显示的响应reviewId=4
:
Section 1: User Info
Question 1: What is your name? Bob Smith
Question 2: what is your occupation? Engineer
Question 3: Your favorite color?
Section 1: User Location
Question 1: What is your work location? New York, NY
Question 2: What is your office floor? 5th
Question 3: your street address? 12 wolf street
我需要显示以下内容(需要有关 sql 的帮助):
Review: 4 | Section 1: User Info | 3 questions | 2 Completed | Flagged: Yes
我的桌子:
Section
:
SectionID int
Title nvarchar(50)
Description nvarchar(2000)
Question
:
QuestionID int
SectionID int
QuestionText nvarchar(2000)
Required boolean
DisplayOrder int
Response
:
ResponseID int
QuestionID int
UserID int int
ReviewId int
AnswerValue nvarchar(1000)
QuestionFlagged
:
FlaggedID int
QuestionID int
ReviewId int
UserId int