gpt4 book ai didi

mysql - 从一行中选择两个不同的值

转载 作者:行者123 更新时间:2023-11-29 14:36:32 24 4
gpt4 key购买 nike

<分区>

我想要这张 table

预订表

+----+--------+
| ID | Status |
+----+--------+
| 1 | R |
| 2 | R |
| 3 | C |
| 4 | C |
+----+--------+

到这个总个数

+----------+-----------+
| Reserved | Cancelled |
+----------+-----------+
| 2 | 2 |
+----------+-----------+

到目前为止我得到了这个-

SELECT Status AS Reserves 
FROM Booking WHERE Status = 'R' OR Status = 'C'

输出-

+----------+
| reserves |
+----------+
| R |
| C |
| R |
| C |
+----------+

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com