Google表格QUERY最近的唯一条目 [英] Google Sheets QUERY most recent unique entries
问题描述
我正在尝试在Google表单响应列表上使用QUERY函数,以仅显示最新的唯一条目(基于关键的学生ID).
I am trying to use the QUERY function on a list of Google Form responses to only display the most recent of unique entries(based on the key Student ID).
A = Timestamp Column
C = Student ID Column
使用:
select max(A)
group by C
我能够获得正确的条目,但每个条目只有一列(我希望从正确的条目中获得所有数据,整行)
I was able to get the right entries, but only one column for each(I want all the data, the whole row, from the right entries)
所以我尝试使用:
select max(A),B,C,D,E,F,G,H
group by C
但这会导致错误
无法解析功能QUERY参数2的查询字符串: ADD_COL_TO_GROUP_BY_OR_AGGB
Unable to parse query string for Function QUERY parameter 2: ADD_COL_TO_GROUP_BY_OR_AGGB
我是数据库新手,第一次使用QUERY.抱歉,这令人困惑,但也许这张纸页更有意义: 电子表格
I am new to databases, first time using QUERY. Sorry if this is confusing, but maybe the sheet makes more sense: spreadsheet
推荐答案
除了克里斯的贡献并使用QUERY():
In addition to Chris' contribution and using QUERY():
=ArrayFormula(vlookup(query({row(Raw!A:A),sort(Raw!A:J)},
"select max(Col1) where Col4 is not null group by Col4 label max(Col1)''",0),
{row(Raw!A:A),sort(Raw!A:J)},{2,3,4,5,6,7,8,9,10,11},1))
这篇关于Google表格QUERY最近的唯一条目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!