Unanswered: How to use a subquery/join with three tables in mysql?
I have three tables as shown above. testplan table stores all the cases executions tables store execution related data builds table stores builds related data
I want to retrive data from these table in such a way that it should display all rows from testplan table, for each row if any execution is there from execution's table and only the build names from builds tables.
I used following query
e.tcversion_id AS EXECUTION_TCVERSION,
b.name AS BUILD_NAME,
e.status AS EXECUTION_STATUS,
e.execution_ts AS EXECUTION_DATE,
e.tester_id AS EXECUTED_BY
from testplan tptcv
inner join executions e on tptcv.tcversion_id=e.tcversion_id and tptcv.platform_id=e.platform_id and tptcv.testplan_id=e.testplan_id
inner join builds b on tptcv.testplan_id=b.testplan_id
enter code here
This query doesn't giving me the expected result as enter code here per the count needed compare to rows in testplan table.