create view v_qa_plaza_index_allquestion
as
select
g.gradename,
s.subjectname,
q.question_title,
P.NICKNAME,
T.BROWSE_COUNT,
q.question_status,
t.latest_update_time
from e_parentlogininfo p, e_subjectinfo s, q_questioninfo q, q_question_stat t, e_gradeinfo g
where Q.QUESTION_ID = P.LOGINID
and Q.SUBJECT_ID = S.SUBJECTID
and Q.STAGE_ID = G.GRADEID
and Q.QUESTIONID = T.QUESTIONID
union all
select
g.gradename,
s.subjectname,
q.question_title,
P.NICKNAME,
T.BROWSE_COUNT,
q.question_status,
t.latest_update_time
from e_logininfo p, e_subjectinfo s, q_questioninfo q, q_question_stat t, e_gradeinfo g
where Q.QUESTION_ID = P.LOGINID
and Q.SUBJECT_ID = S.SUBJECTID
and Q.STAGE_ID = G.GRADEID
and Q.QUESTIONID = T.QUESTIONID
union all
select
g.gradename,
s.subjectname,
q.question_title,
P.NICKNAME,
T.BROWSE_COUNT,
q.question_status,
t.latest_update_time
from e_teacherlogininfo p, e_subjectinfo s, q_questioninfo q, q_question_stat t, e_gradeinfo g
where Q.QUESTION_ID = P.LOGINID
and Q.SUBJECT_ID = S.SUBJECTID
and Q.STAGE_ID = G.GRADEID
and Q.QUESTIONID = T.QUESTIONID
as
select
g.gradename,
s.subjectname,
q.question_title,
P.NICKNAME,
T.BROWSE_COUNT,
q.question_status,
t.latest_update_time
from e_parentlogininfo p, e_subjectinfo s, q_questioninfo q, q_question_stat t, e_gradeinfo g
where Q.QUESTION_ID = P.LOGINID
and Q.SUBJECT_ID = S.SUBJECTID
and Q.STAGE_ID = G.GRADEID
and Q.QUESTIONID = T.QUESTIONID
union all
select
g.gradename,
s.subjectname,
q.question_title,
P.NICKNAME,
T.BROWSE_COUNT,
q.question_status,
t.latest_update_time
from e_logininfo p, e_subjectinfo s, q_questioninfo q, q_question_stat t, e_gradeinfo g
where Q.QUESTION_ID = P.LOGINID
and Q.SUBJECT_ID = S.SUBJECTID
and Q.STAGE_ID = G.GRADEID
and Q.QUESTIONID = T.QUESTIONID
union all
select
g.gradename,
s.subjectname,
q.question_title,
P.NICKNAME,
T.BROWSE_COUNT,
q.question_status,
t.latest_update_time
from e_teacherlogininfo p, e_subjectinfo s, q_questioninfo q, q_question_stat t, e_gradeinfo g
where Q.QUESTION_ID = P.LOGINID
and Q.SUBJECT_ID = S.SUBJECTID
and Q.STAGE_ID = G.GRADEID
and Q.QUESTIONID = T.QUESTIONID