filmov
tv
Get Last record of customer without group by. get last subscription record of each customer Mysql

Показать описание
Get Last record of each customers without group by. get last subscription record of each customer Mysql without sub query or Max
===================================================
Change [LESS THAN SYMBOL] = to less than symbol before run
===================================================
-- by id
SELECT
CURDATE() AS Today_date, t1.*, IF(
FROM
`subscription_transaction` t1
LEFT JOIN `subscription_transaction` t2 ON
WHERE
ORDER BY
-- By date
SELECT
CURDATE() AS Today_date, t1.*, IF(
FROM
`subscription_transaction` t1
LEFT JOIN `subscription_transaction` t2 ON
WHERE
ORDER BY
===================================================
Change [LESS THAN SYMBOL] = to less than symbol before run
===================================================
-- by id
SELECT
CURDATE() AS Today_date, t1.*, IF(
FROM
`subscription_transaction` t1
LEFT JOIN `subscription_transaction` t2 ON
WHERE
ORDER BY
-- By date
SELECT
CURDATE() AS Today_date, t1.*, IF(
FROM
`subscription_transaction` t1
LEFT JOIN `subscription_transaction` t2 ON
WHERE
ORDER BY