Home How to get only rows <= (Quantity) Transact-SQL
Reply: 0

How to get only rows <= (Quantity) Transact-SQL

user547
1#
user547 Published in May 25, 2018, 2:23 pm

Hi I recently wanted to have a report where we can see only the rows that are less or equal than a quantity

example

I have this table

USER   QUANTITY
JOHN       2        
JOHN       3        
JOHN       1         
JOHN       3       

and I want to show only the rows where the Total is 5

and it should show

USER    QUANTITY    
JOHN       2        
JOHN       3        

I never tried this kind of query and I dont know where to start

Can you help me?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.533015 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO