I have the following data in my database:
Table 1
AUDIT_ID FACTORY_ID TYPE
10001 12345 AUDIT 1
10002 23456 AUDIT 1
10003 12345 AUDIT 2
10004 34567 AUDIT 1
10005 23456 AUDIT 2
Table 2
AUDIT_ID QUESTIONS_ID
10001 23
10001 45
10001 57
10001 77
10002 34
10002 45
10003 45
10003 98
I need to create a report to show the total number of questions for a factory that were in AUDIT 1 and also in AUDIT 2.
i.e, for factory 12345, there are 4 questions in audit 1, and 2 questions in audit 2.. but only 1 appears in both audit 1 and 2 (question_id = 45). So in my report i will have to show:
factory #of questions(audit1) #of open questions
12345 4 1
I've tried creating a view and access the view data instead, but it didn't work.
How can I do this?
Thanks again in advance,
Lia
Table 1
AUDIT_ID FACTORY_ID TYPE
10001 12345 AUDIT 1
10002 23456 AUDIT 1
10003 12345 AUDIT 2
10004 34567 AUDIT 1
10005 23456 AUDIT 2
Table 2
AUDIT_ID QUESTIONS_ID
10001 23
10001 45
10001 57
10001 77
10002 34
10002 45
10003 45
10003 98
I need to create a report to show the total number of questions for a factory that were in AUDIT 1 and also in AUDIT 2.
i.e, for factory 12345, there are 4 questions in audit 1, and 2 questions in audit 2.. but only 1 appears in both audit 1 and 2 (question_id = 45). So in my report i will have to show:
factory #of questions(audit1) #of open questions
12345 4 1
I've tried creating a view and access the view data instead, but it didn't work.
How can I do this?
Thanks again in advance,
Lia