|
 |
อยากทราบคำสั่ง SQL ที่จัด GROUP BY ระหว่าง แล้วก็ ใส่เลขให้ด้วยครับ |
|
 |
|
|
 |
 |
|
Code (SQL)
select
sum(if(a<21, 1 , 0)) as `0-20`,
sum(if(a>20 and a<41, 1 , 0)) as `21-40`
from xxxx
where sex='male'
|
 |
 |
 |
 |
Date :
2020-02-05 21:38:18 |
By :
Chaidhanan |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
Load balance : Server 01
|