Answers for "get last date join sql"

SQL
0

get last date join sql

SELECT customer.*, purchase.*
FROM customer
JOIN (
   SELECT DISTINCT ON (customer_id) *
   FROM purchase
   ORDER BY customer_id, date DESC
) purchase ON purchase.customer_id = customer.id
Posted by: Guest on July-23-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language