SQL query two tables with some math?
Posted on 2011-10-23
This is the story.
I have data in two tables.
ID, DATE, Qty
I need query which will give me (SUM(QTY) where DATE = 'User input') * Factor) where IDN ='User input'
In other words: I need Summary of QTY data on specific date multiplied with factor data of IDN (which is suplied by user). There can be different ID, using same IDN FACTOR data.
ID is the same unique data in both tables
User will provide IDN and DATE value.
This is probably simpler than i realize, but today my brain seems to stop functioning.
English is not my native language so i hope you understand all this.