TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Imran Bashir
NA
186
13.5k
column which have the same id
Jul 30 2016 6:12 AM
i have table name stock .in which 5 column name id productId stockIn stockOut And VoucherType and i want to check the if productId=1 and voucherType=1 that count all the column in stockIn witch the same ProductId and Sum All the value in stockIn then also count in stockout with same product id and sum if the stockin sum is greater then stockout that return true...<br /><br /><br /><br /><br /><br />id ' productid ' stockin 'stockout 'VoucherType<br />-----------------------------------------<br />1 | 1 | 5 | 0 | 1<br />2 | 1 | 5 | 0 | 1 <br />3 | 1 | 5 | 0 | 1 <br />4 | 2 | 5 | 0 | 1 <br />5 | 2 | 0 | 5 | 2 <br />6 | 1 | 0 | 2 | 2 <br />7 | 2 | 0 | 3 | 2 <br /><br />
Reply
Answers (
3
)
select second lowest after value
Query to calculate Quantity on Hand