Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在以下选择中:
select col1, count(1) from test_db.new_arch where name like 'DATA1%' or name like 'DUAL%' group by col1
结果将是...
DATA1 10 DUAL2 11
我想合并它们以使它们看起来像这样:
DB_QUERY1 21
那可能吗?
删除group by以获得整个结果集的一行聚合:
group by
select 'DB_QUERY1', count(1) from test_db.new_arch where name like 'DATA1%' or name like 'DUAL%';