I have 2 queries in MS SQL that return a number of results using the COUNT function.
I can run the the first query and get the first result and then run the other on
The query is like below :
((SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(m,'/',2),'/',-1) FROM ms WHERE ms.id=t.m_id)-(SELECT COUNT(id) FROM t AS tr WHERE tr.m_id=t.m_id)) AS remaining