我有一个正在改善的团队排行榜。这是我尝试简化的步骤:
1。使用 ImportHTML 功能导入表格
2。使用查询功能选择所需的列
3。使用过滤功能过滤列中的信息,使其仅包含与指定的现有列表中的名称匹配的名称。
4。按得分对数据进行排序。
这是我的示例工作簿的链接:https://docs.google.com/spreadsheets/d/1F0w-7bW8Wbh-eJubyBubeMM_yMzzcSZw28R0OJ-l8q8/edit#gid=1646904068
您可以从“ IS热身”工作表中看到完成此操作的前一种方法。我正在尝试在“ IS-Individual”中进行精简,然后再精简其他表格。 “名称”表包含我要为其提取结果的团队成员。
=Sort(
Filter(
QUERY(
IMPORTHTML("https://ct.thecmp.org/app/v1/index.php?do=match&task=getMatchResultsDetail&MatchId=18095&EventId=7&AwardId=1","TABLE",1),
"SELECT Col1, Col2, Col3, Col4, Col5, Col6, Col7, Col8, Col9, Col10, Col11, Col12, Col13" & match(Names!A:A,COL1),
Match(Names!A:A,0)),2,True))
我也尝试过:
=Sort(Filter(QUERY(IMPORTHTML("https://ct.thecmp.org/app/v1/index.php?do=match&task=getMatchResultsDetail&MatchId=18095&EventId=7&AwardId=1","TABLE",1),"SELECT Col1, Col2, Col3, Col4, Col5, Col6, Col7, Col8, Col9, Col10, Col11, Col12, Col13"),Match(QUERY(IMPORTHTML("https://ct.thecmp.org/app/v1/index.php?do=match&task=getMatchResultsDetail&MatchId=18095&EventId=7&AwardId=1","TABLE",1),"SELECT Col1, Col2, Col3, Col4, Col5, Col6, Col7, Col8, Col9, Col10, Col11, Col12, Col13"),Names!A:A,0)),2,True)
答案 0 :(得分:0)
create table company
(
CODE_COMPANY char(30),
NAME_COMPANY varchar2(30) not null,
MAIL_COMPANY varchar2(30) null,
constraint PK_CODE_COMPANY primary key (CODE_COMPANY),
);
create table USERNAME
(
NAME_USERNAME varchar2(30),
USER_LOCATION number,
fNAME varchar2 (30) not null,
lNAME varchar2 (30) not null,
PHONE_USER char(13) null,
USER_POSITION varchar2 (30),
check (USER_POSITION in('Admin', 'Superadmin', 'Technician', 'Student')),
constraint PK_NAME_USERNAME primary key (NAME_USERNAME),
constraint FK_USER_LOCATION foreign key (USER_LOCATION) references uLOCATION (LOCATION)
);
create table uLOCATION
(
LOCATION number,
CODE_COMPANY char(30),
NAME_LOCATION varchar2(30) not null,
FLOOR_LOCATION varchar2(10),
check (FLOOR_LOCATION in ('MAIN_FLOOR', '1ST FLOOR', '2ND FLOOR', '3RD FLOOR')),
constraint PK_LOCATION primary key (LOCATION),
constraint FK_CODE_COMPANY_L foreign key (CODE_COMPANY) references company (CODE_COMPANY),
);
如果导入的表格大小不变,这也将起作用:
=SORT(FILTER(QUERY(IMPORTHTML(
"https://ct.thecmp.org/app/v1/index.php?do=match&task=getMatchResultsDetail&MatchId=18095&EventId=7&AwardId=1",
"TABLE", 1),
"SELECT Col1,Col2,Col3,Col4,Col5,Col6,Col7,Col8,Col9,Col10,Col11,Col12,Col13"),
MATCH(INDIRECT("Names!A1:A"&COUNTA(QUERY(IMPORTHTML(
"https://ct.thecmp.org/app/v1/index.php?do=match&task=getMatchResultsDetail&MatchId=18095&EventId=7&AwardId=1",
"TABLE", 1),
"SELECT Col1"))+1), 0)), 2, 1)