Hello,
I have a table called "LOADINGS". In that table there are informations about the loadings of orders.(Some orders have a lot of loadings)
For example some rows:
I want to create a query that shows me the LAST Loading Date of an order for all orders.
F.e. for the order 20220160 i must take "10/1/2022" but fot order 20220163 i have to take 13/1/2022.
I have created this query, but it shows me all the records. I know that something is missing but i cannot find that. Do you have any idea?
I have a table called "LOADINGS". In that table there are informations about the loadings of orders.(Some orders have a lot of loadings)
For example some rows:
I want to create a query that shows me the LAST Loading Date of an order for all orders.
F.e. for the order 20220160 i must take "10/1/2022" but fot order 20220163 i have to take 13/1/2022.
I have created this query, but it shows me all the records. I know that something is missing but i cannot find that. Do you have any idea?
Code:
SELECT DISTINCT LOADINGS.ORDER_ID, LOADINGS.LOADING_DATE
FROM LOADINGS
ORDER BY LOADINGS.LOADING_DATE DESC;