Advertisement
42ama

aerosolWithColor

Mar 10th, 2020
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. SELECT V_ID, V_COLOR, 255 - ISNULL(SUM(B_VOL), 0) AS remaining
  2. FROM utV utV
  3. LEFT JOIN utB utB ON utV.V_ID = utB.B_V_ID
  4. GROUP BY V_ID, V_COLOR
  5. HAVING 255 - ISNULL(SUM(B_VOL), 0) != 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement