Skip to Main Content
Table 1: 
The 13 operator types of QDMR steps. Listed are, the natural language template used to express the operator, the operator signature, and an example question that uses the query operator in its decomposition.
OperatorTemplate / SignatureQuestionDecomposition
Select Return [entities] w→Se How many touchdowns were scored overall? 1. Return touchdowns 2. Return the number of #1 
Filter Return [ref] [condition] So, w→So I would like a flight from Toronto to San Diego please. 1. Return flights2. Return #1 from Toronto3. Return #2 to San Diego 
Project Return [relation] of [ref] w,Se→So Who is the head coach of the Los Angeles Lakers? 1. Return the Los Angeles Lakers 2. Return the head coach of #1 
Aggregate Return [aggregate] of [ref] wagg,So→n How many states border Colorado? 1. Return Colorado 2. Return border states of #13. Return the number of #2 
Group Return [aggregate] [ref1] for each [ref2] wagg,So,Se→Sn How many female students are there in each club? 1. Return clubs 2. Return female students of #13. Return the number of #2 for each #1 
Superlative Return [ref1] where [ref2] is [highest / lowest] Se,Sn,wsup→Se What is the keyword, which has been contained by the most number of papers? 1. Return papers 2. Return keywords of #1 3. Return the number of #1 for each #24. Return #2 where #3 is highest 
Comparative Return [ref1] where [ref2] [comparison] [number] Se,Sn,wcom,n→Se Who are the authors who have more than 500 papers? 1. Return authors 2. Return papers of #1 3. Return the number of #2 for each of #14. Return #1 where #3 is more than 500 
Union Return [ref1] , [ref2] So,So→So Tell me who the president and vice- president are? 1. Return the president 2. Return the vice-president3. Return #1, #2 
Intersection Return [relation] in both [ref1] and [ref2] w,Se,Se→So Show the parties that have representatives in both New York state and representatives in Pennsylvania state. 1. Return representatives 2. Return #1 in New York state 3. Return #1 in Pennsylvania state4. Return parties in both #2 and #3 
Discard Return [ref1] besides [ref2] So,So→So Find the professors who are not playing Canoeing. 1. Return professors 2. Return #1 playing Canoeing3. Return #1 besides #2 
Sort Return [ref1] sorted by [ref2] Se,Sn→〈e1...ek Find all information about student addresses, and sort by monthly rental. 1. Return students 2. Return addresses of #1 3. Return monthly rental of #24. Return #2 sorted by #3 
Boolean Return [if / is] [ref1] [condition] [ref2] So,w,So→b Were Scott Derrickson and Ed Wood of the same nationality? ... 3. Return the nationality of #1 4. Return the nationality of #25. Return if #3 is the same as #4 
Arithmetic Return the [arithmetic] of [ref1] and [ref2] wari,n,n→n How many more red objects are there than blue objects? ... 3. Return the number of #1 4. Return the number of #25. Return the difference of #3 and #4 
OperatorTemplate / SignatureQuestionDecomposition
Select Return [entities] w→Se How many touchdowns were scored overall? 1. Return touchdowns 2. Return the number of #1 
Filter Return [ref] [condition] So, w→So I would like a flight from Toronto to San Diego please. 1. Return flights2. Return #1 from Toronto3. Return #2 to San Diego 
Project Return [relation] of [ref] w,Se→So Who is the head coach of the Los Angeles Lakers? 1. Return the Los Angeles Lakers 2. Return the head coach of #1 
Aggregate Return [aggregate] of [ref] wagg,So→n How many states border Colorado? 1. Return Colorado 2. Return border states of #13. Return the number of #2 
Group Return [aggregate] [ref1] for each [ref2] wagg,So,Se→Sn How many female students are there in each club? 1. Return clubs 2. Return female students of #13. Return the number of #2 for each #1 
Superlative Return [ref1] where [ref2] is [highest / lowest] Se,Sn,wsup→Se What is the keyword, which has been contained by the most number of papers? 1. Return papers 2. Return keywords of #1 3. Return the number of #1 for each #24. Return #2 where #3 is highest 
Comparative Return [ref1] where [ref2] [comparison] [number] Se,Sn,wcom,n→Se Who are the authors who have more than 500 papers? 1. Return authors 2. Return papers of #1 3. Return the number of #2 for each of #14. Return #1 where #3 is more than 500 
Union Return [ref1] , [ref2] So,So→So Tell me who the president and vice- president are? 1. Return the president 2. Return the vice-president3. Return #1, #2 
Intersection Return [relation] in both [ref1] and [ref2] w,Se,Se→So Show the parties that have representatives in both New York state and representatives in Pennsylvania state. 1. Return representatives 2. Return #1 in New York state 3. Return #1 in Pennsylvania state4. Return parties in both #2 and #3 
Discard Return [ref1] besides [ref2] So,So→So Find the professors who are not playing Canoeing. 1. Return professors 2. Return #1 playing Canoeing3. Return #1 besides #2 
Sort Return [ref1] sorted by [ref2] Se,Sn→〈e1...ek Find all information about student addresses, and sort by monthly rental. 1. Return students 2. Return addresses of #1 3. Return monthly rental of #24. Return #2 sorted by #3 
Boolean Return [if / is] [ref1] [condition] [ref2] So,w,So→b Were Scott Derrickson and Ed Wood of the same nationality? ... 3. Return the nationality of #1 4. Return the nationality of #25. Return if #3 is the same as #4 
Arithmetic Return the [arithmetic] of [ref1] and [ref2] wari,n,n→n How many more red objects are there than blue objects? ... 3. Return the number of #1 4. Return the number of #25. Return the difference of #3 and #4 
Close Modal

or Create an Account

Close Modal
Close Modal