Bagaimana untuk memaparkan hanya nilai terendah daripada set hasil (MYSQL)
P粉338969567
P粉338969567 2024-04-06 21:44:19
0
1
760

Saya mempunyai kenyataan berikut:

select DATE(recieved_on) as Day, round (count(*) / 24)  AS 'average'
from message
where facility in ('FACID')
AND received on BETWEEN '2022-05-29 00:00:00' AND '2022-06-04 23:59:59'
GROUP BY DATE(received on);

Ia menyediakan set hasil berikut:

Hari Sederhana
Tarikh Nilai
Tarikh Nilai
Tarikh Nilai
Tarikh Nilai
Tarikh Nilai
Tarikh Nilai
Tarikh Nilai

Bagaimana untuk memaparkan hanya nilai terendah dalam set hasil dan bukannya kesemua 7 nilai?

P粉338969567
P粉338969567

membalas semua(1)
P粉790819727

Anda hanya gunakan pesanan mengikut dan hadkan:

select DATE(recieved_on) as Day, round (count(*) / 24) AS 'average'
from message
where facility in ('FACID') AND received on BETWEEN '2022-05-29 00:00:00' AND '2022-06-04 23:59:59'
GROUP BY DATE(received on)
order by average
limit 1
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan