Hi guys I’m having problems to make a query in sql server.
I have 3 tables: testcases, executions and execution_bugs:
testcases
id | name
-------------
1 | Login
2 | Logout
executions
id | testcase_id
-----------------
1 | 1
2 | 2
3 | 1
execution_bugs
execution_id | bug_id
----------------------
1 | B-1
3 | B-2
And I need to know how many testcases are defined, how many of them have been executed, how many testcases have bugs and how many do not.
I was looking for a query that would give me this kind of result:
testcases_n | executed | with_bugs | without_bugs | bugs_amount
---------------------------------------------------------------
2 | 2 | 1 | 1 | 2
Is this possible given the table structure?
Thanks!
You mean something like this: