我想通過2列的GROUP BY獲取我的表的所有結果並獲取最後一次插入。 「價格」 表: 我的要求: SELECT DISTINCT p.*
FROM prices p
JOIN (
SELECT MAX(created_at) as "last_created"
FROM prices
WHERE station_id = 27210003
GROUP BY station_id, fu
當我運行這個程序時,它說最大數量比它實際在列表中低1個數字。例如,我運行下面的代碼,它告訴我,當它從列表中是92時,最大數字是91。 examMarks = [[80, 59, 34, 89], [31, 11, 47, 64], [29, 56, 13, 92]]
for eachRow in range(len(examMarks)):
for eachColumn in ran
這裏是我的查詢: SELECT loc.id, loc.nom, loc.prenom, loc.num_tel, loc.num_fixe, bat.adresse, b.date_entree, b.date_sortie, p.date FROM locataires AS loc, bail AS b, apparts AS ap, batiments as bat, clients as