按多列对数据视图中的结果集进行排序

Sort Result Set in Data View by Multiple Columns

在 DataGrip 的早期版本中(假定早于 2021.1),数据视图窗格中的结果集允许 ad-hoc 通过单击列 [=] 跨多个列进行排序57=]s 顺序分配自定义排序顺序。此功能记录在 Data Editor Documentation 中。自版本 2021.1 发布以来,依次单击多个列将仅按最近单击的列 header 对整个结果集进行排序。

使用以下语句作为示例会产生一个包含 120 个日期值的结果集,时间跨度为 4 个月,其中 month_start_date 重复 calendar_date 同一个月内出现的值:

SELECT month_start_date
     , calendar_date
FROM calendar
WHERE month_start_date BETWEEN '2021-01-01' AND '2021-04-01'
GROUP BY 1, 2

点击month_start_date列header时,整个结果集按照month_start_date[排序=38=]:

当随后单击 calendar_date header 时(在单击 month_start_date 列之后header), 整个结果集 re-sorted 仅基于 calendar_date:

的值

在版本 2021.1 中是否有按多列排序的方法,或者此功能是否已被有意删除?

release notes中所述,从2021.1起应通过Alt/Opt+Click.

执行累积排序