0
我已經寫了一個SQL來獲取每個用戶在數據庫上的票證信息。SQL用於顯示查詢字段明智
select u.realname,count(t.id) as ct,t.Status
from Tickets t,Users u
where u.id=t.Owner and (t.status='New' or t.status='Stalled' or t.status='Open')
group by u.realname,t.status;
它給出這樣
| Enoch Root | 1 | new |
| Enoch Root | 1 | stalled |
| xyz Chan | 1 | open |
| Jim | 22 | stalled |
但什麼我期待的輸出是對身份的用戶
像
open stalled new
root 1 10 14
請讓我知道