I am Working on project, where I am using two queries to get the result i wanted to process.
Query 1
SELECT MID FROM PMS.MACHINE WHERE STATUS=1 AND MID !=0;
Query 2
SELECT MID,COUNT(STATUS) AS QUEUE
FROM PMS.QUEUE
WHERE STATUS=0
GROUP BY MID
ORDER BY MID ASC;
I wanted to merge this two query into a single query, result should be display as MID from PMS.MACHINE and QUEUE Count From PMS.QUEUE Table.
If there is no count then it will result as zero
these are my current results of query 1
query 2 result
in query 2 if the value zero it returns like this
I want result as like
2
Answers
Try this