Fix PostgreSQL GROUP BY rule for images/patients route

This commit is contained in:
VPS 4 Builder
2026-05-26 04:25:11 +02:00
parent ec3f23c9ea
commit a04dea830b
+3 -3
View File
@@ -64,9 +64,9 @@ router.get('/patients', async (req, res) => {
const rows = await db.all(
`SELECT
patient_name,
doctor,
remark,
client_name,
MAX(doctor) AS doctor,
MAX(remark) AS remark,
MAX(client_name) AS client_name,
COUNT(*) AS image_count,
MAX(created_at) AS last_date,
(SELECT filename FROM images i2