我這樣的查詢: SELECT a.id, a.store_id, a.name, a.total_sold, a.updated_at, b.name AS store_name
FROM products a
JOIN stores b ON b.id = a.store_id
JOIN products_categories c ON c.product_id = a.id
WHERE
最大日我有這樣 SELECT DISTINCT
FND.ID_CON,
SPRT.CODE,
SPRT.NOM,
SPRT.DATE_VALUE,
COTPLACE.LIBELLE
FROM
FND,
SPRT,
CONTRACT,
COTPLACE
WHERE
FND.code=SPRT.code
and FND.cot_place=SPRT.cot_place
an
如何獲取包含max(列)的完整行。 例子: 我有一個表像這樣 +----+---------------+------+---------------------+
| id | title | c | update |
+----+---------------+------+---------------------+
| 1 | John S. | 15 | 2017-09