I have two SQL queries that I would like to combined into one, if its possible. The fist is to get information about a shop order and the second is to get revision information from all previous records with the same shop_order_id.
The first query:
SELECT so.shop_order_id, so.shop_order_suffix, so.status, so.mfg_method, so.description
FROM shop_order so
WHERE so.shop_order_id = 'ZZ1810C'
AND so.shop_order_suffix = '000';`
The second query:
SELECT so.user_att27, so.user_att28
FROM shop_order so
WHERE so.shop_order_id LIKE 'ZZ1810C%'
ORDER BY shop_order_suffix DESC;`
Is it possible to combined them so that they run at one time and if so how would i got about doing it?
I think you need a JOIN :