I have the following query:
SELECT MAX(b.upd_dtime) as MaxT, b.vo_no as vo_no, y.item_no
FROM vo_order_t b JOIN (
SELECT a.vo_no, a.item_no FROM vo_item_t a where a.item_no IN('00265929')) y ON y.vo_no = b.vo_no
GROUP BY b.vo_no, y.item_no
The output from this query is the following:
Date Vo_No Item_No
2019-05-27 08:37:07 0242625 00265929
2019-05-27 07:52:29 0282971 00265929
2019-05-27 07:52:29 0282972 00265929
2019-05-27 07:52:29 0696864 00265929
2018-02-13 22:57:09 0282984 00265929
2019-05-27 07:52:29 0395347 00265929
2019-05-27 07:52:29 0242712 00265929
2019-05-27 07:52:29 0242624 00265929
2019-05-27 07:52:29 0441449 00265929
2019-05-27 07:52:29 0400026 00265929
But I want the output to be the following:
Date Vo_no Item_No
2019-05-27 08:37:07 0242625 00265929
How can I modify my query to achieve that?