The WHERE and ORDER BY clauses of the SQL SELECT statement select a subset of rows in the result of a database query and present the result in the specified order. In a spreadsheet program like Microsoft Excel, one could use the filter and sort buttons, or use its Query or its Pivot Table tools to achieve a similar effect. The disadvantage of using those tools is that they don't react automatically to changes in the calculated values of the spreadsheet. In this paper, we develop spreadsheet formulas that implement SQL's WHERE and ORDER BY clauses.
翻译:SQL SELECT 语句中的条款选择了数据库查询结果中的一行子集,并在指定顺序中展示了结果。在微软Excel 这样的电子表格程序下,人们可以使用过滤器和排序按钮,或者使用其查询工具或其Pivot Table 工具实现类似效果。使用这些工具的缺点是,它们不会对电子表格计算值的变化自动作出反应。在本文中,我们开发了执行 SQL 所在地和 ORDER 条款的电子表格公式。