如果我执行下面的代码:
with temp as
(
select 'Test' as name
UNION ALL
select 'TEST'
UNION ALL
select 'test'
UNION ALL
select 'tester'
UNION ALL
select 'tester'
)
SELECT name, COUNT(name)
FROM temp
group by name
它返回结果:
TEST 3
tester 2
有没有办法让 group by 区分大小写,以便结果是:
Test 1
TEST 1
test 1
tester 2