Created
February 9, 2021 23:38
-
-
Save JLLeitschuh/f01c8369775113a0dd5671e2a3acfe50 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tutorial | |
from Person t | |
where t.getHeight() > 150 and | |
t.getHairColor() != "blond" and | |
exists (string c | t.getHairColor() = c) and | |
t.getAge() >= 30 and | |
t.getLocation() = "east" and | |
(t.getHairColor() = "black" or t.getHairColor() = "brown") and | |
not (t.getHeight() > 180 and t.getHeight() < 190) and | |
not t = max(Person p | | p order by p.getAge()) and | |
not t = max(Person p | | p order by p.getHeight()) and | |
t.getHeight() < avg(Person p | | p.getHeight()) and | |
t = max(Person p | p.getLocation() = "east" | p order by p.getAge()) | |
select t, "is " + t.getHeight() + " units tall", "and is " + t.getAge() + " years old" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment