Get not matching record as null while joining two queries I have two queries having same columns, 1 returning 3 rows and other returning 2 rows. While I join this two query I am able to get only 2 rows. How can I get three rows with not matching record as null in sql server?

Query1: 

Select UDA.production_date_T, Count (WO.order_state) AS 'cntplan' 
From WORK_ORDER WO 
INNER JOIN UDA_Order UDA ON UDA.object_key = WO.order_key 
group by UDA.production_date_T) TBL1


Query2:

Select UDA.production_date_T, Count (WO.order_state) AS 'ACTUAL' 
From WORK_ORDER WO 
INNER JOIN UDA_Order UDA 
ON UDA.object_key = WO.order_key 
WHERE WO.order_state = 'BOOKED' 
GROUP BY UDA.production_date_T


My desired Output is:

production_date_T           cntplan     ACTUAL
2019-04-26                       22         4
2019-05-03                        4        NULL
2019-09-05                        19        0
Seems to me like you just need to move the filter you are using in the second query as a CASE expression:

SELECT  UDA.production_date_T, 
        COUNT(WO.order_state) cntplan,
        SUM(CASE WHEN WO.order_state = 'BOOKED' THEN 1 ELSE 0 END) ACTUAL
FROM dbo.WORK_ORDER WO 
INNER JOIN dbo.UDA_Order UDA 
    ON UDA.object_key = WO.order_key 
GROUP BY UDA.production_date_T
;