我有一个文件,其中包含多个选择查询。
我每周运行这些查询以生成公司内部报告。
例如(这不是实际的查询):
-- Select number of users
SELECT count(id) from users;
-- Select number of active users
SELECT count(id) from users where active = true;
-- Select number of logins this week
SELECT count(id) from users where last_login > current_date - interval '1 week';
--- etc...
在DataGrip中,是否有一种方法可以运行所有这些查询并将它们导出为csv文件?
我能够运行每个查询,然后导出数据集,但是逐个操作非常耗时。