I really need some help. I have two different tables, but I wont to join the two tables together all in one select statement. I have provided in attachment, on how the table look now, in how I'm trying to get the tables.



SQL Table Example.txt


Table 1:
SELECT [SerialNumber]
,[In Stock]
,SerialNumber - [In Stock] as [Short Of]
FROM [phabsproduction].[dbo].[Stock_Inventory]
where
(SerialNumber - [In Stock])<0
order by
[Short Of] desc



Table 2:
SELECT PartNumber,Count(PartNumber) AS Total FROM Stock_Inventory WHERE [PartNumber] like '82480-%' or [PartNumber] like '83480-%' GROUP BY PartNumber


WHAT I WILL NEED FROM THE TABLE 1 ARE THE FOLLOWING; I WILL NEED THIS PART ADDED IN THE TABLE 2 QUERY;

,SerialNumber - [In Stock] as [Short Of]
FROM [phabsproduction].[dbo].[Stock_Inventory]
where
(SerialNumber - [In Stock])<0
order by
[Short Of] desc