Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- +-------------+-------------+------------+------------+---------------------+
- | mod_coli_id | line_number | total_cost | total_sell | modify_date |
- +-------------+-------------+------------+------------+---------------------+
- | 1403974 | 1 | 544.5000 | 640.5900 | 2016-09-13 13:21:15 |
- | 1403976 | 1 | 544.5000 | 640.5900 | 2016-09-13 13:26:54 |
- | 1403986 | 1 | 544.5000 | 544.5000 | 2016-09-13 13:35:49 |
- | 1405972 | 1 | 544.5000 | 544.5000 | 2016-09-15 10:02:11 |
- +-------------+-------------+------------+------------+---------------------+
- SELECT mod_coli_id,line_number,total_cost,total_sell,max(modify_date) as modify_date
- From mod_customer_order_line_item
- Where customer_order_id=17761 AND modify_date<='2016-09-14'
- +-------------+-------------+------------+------------+---------------------+
- | mod_coli_id | line_number | total_cost | total_sell | modify_date |
- +-------------+-------------+------------+------------+---------------------+
- | 1403974 | 1 | 544.5000 | 640.5900 | 2016-09-13 13:35:49 |
- +-------------+-------------+------------+------------+---------------------+
- +-------------+-------------+------------+------------+---------------------+
- | mod_coli_id | line_number | total_cost | total_sell | modify_date |
- +-------------+-------------+------------+------------+---------------------+
- | 1403986 | 1 | 544.5000 | 544.5000 | 2016-09-13 13:35:49 |
- +-------------+-------------+------------+------------+---------------------+
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement