Skip to content

Instantly share code, notes, and snippets.

@simonw
Created July 7, 2017 22:13
Show Gist options
  • Save simonw/762a98de85a2f113d1d7ec6026f73ee4 to your computer and use it in GitHub Desktop.
Save simonw/762a98de85a2f113d1d7ec6026f73ee4 to your computer and use it in GitHub Desktop.
SQL queries example for swapi-graphene
(0.001) SELECT COUNT(*) AS "__count" FROM "starwars_species"; args=()
(0.000) SELECT "starwars_species"."id", "starwars_species"."created", "starwars_species"."edited", "starwars_species"."name", "starwars_species"."classification", "starwars_species"."designation", "starwars_species"."average_height", "starwars_species"."skin_colors", "starwars_species"."hair_colors", "starwars_species"."eye_colors", "starwars_species"."average_lifespan", "starwars_species"."homeworld_id", "starwars_species"."language" FROM "starwars_species" LIMIT 37; args=()
(0.000) SELECT "starwars_planet"."id", "starwars_planet"."created", "starwars_planet"."edited", "starwars_planet"."name", "starwars_planet"."rotation_period", "starwars_planet"."orbital_period", "starwars_planet"."diameter", "starwars_planet"."climate", "starwars_planet"."gravity", "starwars_planet"."terrain", "starwars_planet"."surface_water", "starwars_planet"."population" FROM "starwars_planet" WHERE "starwars_planet"."id" = 9; args=(9,)
(0.000) SELECT "starwars_planet"."id", "starwars_planet"."created", "starwars_planet"."edited", "starwars_planet"."name", "starwars_planet"."rotation_period", "starwars_planet"."orbital_period", "starwars_planet"."diameter", "starwars_planet"."climate", "starwars_planet"."gravity", "starwars_planet"."terrain", "starwars_planet"."surface_water", "starwars_planet"."population" FROM "starwars_planet" WHERE "starwars_planet"."id" = 14; args=(14,)
(0.000) SELECT "starwars_planet"."id", "starwars_planet"."created", "starwars_planet"."edited", "starwars_planet"."name", "starwars_planet"."rotation_period", "starwars_planet"."orbital_period", "starwars_planet"."diameter", "starwars_planet"."climate", "starwars_planet"."gravity", "starwars_planet"."terrain", "starwars_planet"."surface_water", "starwars_planet"."population" FROM "starwars_planet" WHERE "starwars_planet"."id" = 23; args=(23,)
(0.000) SELECT "starwars_planet"."id", "starwars_planet"."created", "starwars_planet"."edited", "starwars_planet"."name", "starwars_planet"."rotation_period", "starwars_planet"."orbital_period", "starwars_planet"."diameter", "starwars_planet"."climate", "starwars_planet"."gravity", "starwars_planet"."terrain", "starwars_planet"."surface_water", "starwars_planet"."population" FROM "starwars_planet" WHERE "starwars_planet"."id" = 24; args=(24,)
(0.000) SELECT "starwars_planet"."id", "starwars_planet"."created", "starwars_planet"."edited", "starwars_planet"."name", "starwars_planet"."rotation_period", "starwars_planet"."orbital_period", "starwars_planet"."diameter", "starwars_planet"."climate", "starwars_planet"."gravity", "starwars_planet"."terrain", "starwars_planet"."surface_water", "starwars_planet"."population" FROM "starwars_planet" WHERE "starwars_planet"."id" = 28; args=(28,)
(0.000) SELECT "starwars_planet"."id", "starwars_planet"."created", "starwars_planet"."edited", "starwars_planet"."name", "starwars_planet"."rotation_period", "starwars_planet"."orbital_period", "starwars_planet"."diameter", "starwars_planet"."climate", "starwars_planet"."gravity", "starwars_planet"."terrain", "starwars_planet"."surface_water", "starwars_planet"."population" FROM "starwars_planet" WHERE "starwars_planet"."id" = 29; args=(29,)
(0.000) SELECT "starwars_planet"."id", "starwars_planet"."created", "starwars_planet"."edited", "starwars_planet"."name", "starwars_planet"."rotation_period", "starwars_planet"."orbital_period", "starwars_planet"."diameter", "starwars_planet"."climate", "starwars_planet"."gravity", "starwars_planet"."terrain", "starwars_planet"."surface_water", "starwars_planet"."population" FROM "starwars_planet" WHERE "starwars_planet"."id" = 31; args=(31,)
(0.000) SELECT "starwars_planet"."id", "starwars_planet"."created", "starwars_planet"."edited", "starwars_planet"."name", "starwars_planet"."rotation_period", "starwars_planet"."orbital_period", "starwars_planet"."diameter", "starwars_planet"."climate", "starwars_planet"."gravity", "starwars_planet"."terrain", "starwars_planet"."surface_water", "starwars_planet"."population" FROM "starwars_planet" WHERE "starwars_planet"."id" = 7; args=(7,)
(0.000) SELECT "starwars_planet"."id", "starwars_planet"."created", "starwars_planet"."edited", "starwars_planet"."name", "starwars_planet"."rotation_period", "starwars_planet"."orbital_period", "starwars_planet"."diameter", "starwars_planet"."climate", "starwars_planet"."gravity", "starwars_planet"."terrain", "starwars_planet"."surface_water", "starwars_planet"."population" FROM "starwars_planet" WHERE "starwars_planet"."id" = 33; args=(33,)
(0.000) SELECT "starwars_planet"."id", "starwars_planet"."created", "starwars_planet"."edited", "starwars_planet"."name", "starwars_planet"."rotation_period", "starwars_planet"."orbital_period", "starwars_planet"."diameter", "starwars_planet"."climate", "starwars_planet"."gravity", "starwars_planet"."terrain", "starwars_planet"."surface_water", "starwars_planet"."population" FROM "starwars_planet" WHERE "starwars_planet"."id" = 18; args=(18,)
(0.000) SELECT "starwars_planet"."id", "starwars_planet"."created", "starwars_planet"."edited", "starwars_planet"."name", "starwars_planet"."rotation_period", "starwars_planet"."orbital_period", "starwars_planet"."diameter", "starwars_planet"."climate", "starwars_planet"."gravity", "starwars_planet"."terrain", "starwars_planet"."surface_water", "starwars_planet"."population" FROM "starwars_planet" WHERE "starwars_planet"."id" = 8; args=(8,)
(0.000) SELECT "starwars_planet"."id", "starwars_planet"."created", "starwars_planet"."edited", "starwars_planet"."name", "starwars_planet"."rotation_period", "starwars_planet"."orbital_period", "starwars_planet"."diameter", "starwars_planet"."climate", "starwars_planet"."gravity", "starwars_planet"."terrain", "starwars_planet"."surface_water", "starwars_planet"."population" FROM "starwars_planet" WHERE "starwars_planet"."id" = 34; args=(34,)
(0.000) SELECT "starwars_planet"."id", "starwars_planet"."created", "starwars_planet"."edited", "starwars_planet"."name", "starwars_planet"."rotation_period", "starwars_planet"."orbital_period", "starwars_planet"."diameter", "starwars_planet"."climate", "starwars_planet"."gravity", "starwars_planet"."terrain", "starwars_planet"."surface_water", "starwars_planet"."population" FROM "starwars_planet" WHERE "starwars_planet"."id" = 35; args=(35,)
(0.000) SELECT "starwars_planet"."id", "starwars_planet"."created", "starwars_planet"."edited", "starwars_planet"."name", "starwars_planet"."rotation_period", "starwars_planet"."orbital_period", "starwars_planet"."diameter", "starwars_planet"."climate", "starwars_planet"."gravity", "starwars_planet"."terrain", "starwars_planet"."surface_water", "starwars_planet"."population" FROM "starwars_planet" WHERE "starwars_planet"."id" = 37; args=(37,)
(0.000) SELECT "starwars_planet"."id", "starwars_planet"."created", "starwars_planet"."edited", "starwars_planet"."name", "starwars_planet"."rotation_period", "starwars_planet"."orbital_period", "starwars_planet"."diameter", "starwars_planet"."climate", "starwars_planet"."gravity", "starwars_planet"."terrain", "starwars_planet"."surface_water", "starwars_planet"."population" FROM "starwars_planet" WHERE "starwars_planet"."id" = 38; args=(38,)
(0.000) SELECT "starwars_planet"."id", "starwars_planet"."created", "starwars_planet"."edited", "starwars_planet"."name", "starwars_planet"."rotation_period", "starwars_planet"."orbital_period", "starwars_planet"."diameter", "starwars_planet"."climate", "starwars_planet"."gravity", "starwars_planet"."terrain", "starwars_planet"."surface_water", "starwars_planet"."population" FROM "starwars_planet" WHERE "starwars_planet"."id" = 39; args=(39,)
(0.000) SELECT "starwars_planet"."id", "starwars_planet"."created", "starwars_planet"."edited", "starwars_planet"."name", "starwars_planet"."rotation_period", "starwars_planet"."orbital_period", "starwars_planet"."diameter", "starwars_planet"."climate", "starwars_planet"."gravity", "starwars_planet"."terrain", "starwars_planet"."surface_water", "starwars_planet"."population" FROM "starwars_planet" WHERE "starwars_planet"."id" = 40; args=(40,)
(0.000) SELECT "starwars_planet"."id", "starwars_planet"."created", "starwars_planet"."edited", "starwars_planet"."name", "starwars_planet"."rotation_period", "starwars_planet"."orbital_period", "starwars_planet"."diameter", "starwars_planet"."climate", "starwars_planet"."gravity", "starwars_planet"."terrain", "starwars_planet"."surface_water", "starwars_planet"."population" FROM "starwars_planet" WHERE "starwars_planet"."id" = 41; args=(41,)
(0.000) SELECT "starwars_planet"."id", "starwars_planet"."created", "starwars_planet"."edited", "starwars_planet"."name", "starwars_planet"."rotation_period", "starwars_planet"."orbital_period", "starwars_planet"."diameter", "starwars_planet"."climate", "starwars_planet"."gravity", "starwars_planet"."terrain", "starwars_planet"."surface_water", "starwars_planet"."population" FROM "starwars_planet" WHERE "starwars_planet"."id" = 43; args=(43,)
(0.000) SELECT "starwars_planet"."id", "starwars_planet"."created", "starwars_planet"."edited", "starwars_planet"."name", "starwars_planet"."rotation_period", "starwars_planet"."orbital_period", "starwars_planet"."diameter", "starwars_planet"."climate", "starwars_planet"."gravity", "starwars_planet"."terrain", "starwars_planet"."surface_water", "starwars_planet"."population" FROM "starwars_planet" WHERE "starwars_planet"."id" = 44; args=(44,)
(0.000) SELECT "starwars_planet"."id", "starwars_planet"."created", "starwars_planet"."edited", "starwars_planet"."name", "starwars_planet"."rotation_period", "starwars_planet"."orbital_period", "starwars_planet"."diameter", "starwars_planet"."climate", "starwars_planet"."gravity", "starwars_planet"."terrain", "starwars_planet"."surface_water", "starwars_planet"."population" FROM "starwars_planet" WHERE "starwars_planet"."id" = 45; args=(45,)
(0.000) SELECT "starwars_planet"."id", "starwars_planet"."created", "starwars_planet"."edited", "starwars_planet"."name", "starwars_planet"."rotation_period", "starwars_planet"."orbital_period", "starwars_planet"."diameter", "starwars_planet"."climate", "starwars_planet"."gravity", "starwars_planet"."terrain", "starwars_planet"."surface_water", "starwars_planet"."population" FROM "starwars_planet" WHERE "starwars_planet"."id" = 46; args=(46,)
(0.000) SELECT "starwars_planet"."id", "starwars_planet"."created", "starwars_planet"."edited", "starwars_planet"."name", "starwars_planet"."rotation_period", "starwars_planet"."orbital_period", "starwars_planet"."diameter", "starwars_planet"."climate", "starwars_planet"."gravity", "starwars_planet"."terrain", "starwars_planet"."surface_water", "starwars_planet"."population" FROM "starwars_planet" WHERE "starwars_planet"."id" = 47; args=(47,)
(0.000) SELECT "starwars_planet"."id", "starwars_planet"."created", "starwars_planet"."edited", "starwars_planet"."name", "starwars_planet"."rotation_period", "starwars_planet"."orbital_period", "starwars_planet"."diameter", "starwars_planet"."climate", "starwars_planet"."gravity", "starwars_planet"."terrain", "starwars_planet"."surface_water", "starwars_planet"."population" FROM "starwars_planet" WHERE "starwars_planet"."id" = 48; args=(48,)
(0.000) SELECT "starwars_planet"."id", "starwars_planet"."created", "starwars_planet"."edited", "starwars_planet"."name", "starwars_planet"."rotation_period", "starwars_planet"."orbital_period", "starwars_planet"."diameter", "starwars_planet"."climate", "starwars_planet"."gravity", "starwars_planet"."terrain", "starwars_planet"."surface_water", "starwars_planet"."population" FROM "starwars_planet" WHERE "starwars_planet"."id" = 49; args=(49,)
(0.000) SELECT "starwars_planet"."id", "starwars_planet"."created", "starwars_planet"."edited", "starwars_planet"."name", "starwars_planet"."rotation_period", "starwars_planet"."orbital_period", "starwars_planet"."diameter", "starwars_planet"."climate", "starwars_planet"."gravity", "starwars_planet"."terrain", "starwars_planet"."surface_water", "starwars_planet"."population" FROM "starwars_planet" WHERE "starwars_planet"."id" = 50; args=(50,)
(0.000) SELECT "starwars_planet"."id", "starwars_planet"."created", "starwars_planet"."edited", "starwars_planet"."name", "starwars_planet"."rotation_period", "starwars_planet"."orbital_period", "starwars_planet"."diameter", "starwars_planet"."climate", "starwars_planet"."gravity", "starwars_planet"."terrain", "starwars_planet"."surface_water", "starwars_planet"."population" FROM "starwars_planet" WHERE "starwars_planet"."id" = 11; args=(11,)
(0.000) SELECT "starwars_planet"."id", "starwars_planet"."created", "starwars_planet"."edited", "starwars_planet"."name", "starwars_planet"."rotation_period", "starwars_planet"."orbital_period", "starwars_planet"."diameter", "starwars_planet"."climate", "starwars_planet"."gravity", "starwars_planet"."terrain", "starwars_planet"."surface_water", "starwars_planet"."population" FROM "starwars_planet" WHERE "starwars_planet"."id" = 51; args=(51,)
(0.000) SELECT "starwars_planet"."id", "starwars_planet"."created", "starwars_planet"."edited", "starwars_planet"."name", "starwars_planet"."rotation_period", "starwars_planet"."orbital_period", "starwars_planet"."diameter", "starwars_planet"."climate", "starwars_planet"."gravity", "starwars_planet"."terrain", "starwars_planet"."surface_water", "starwars_planet"."population" FROM "starwars_planet" WHERE "starwars_planet"."id" = 54; args=(54,)
(0.000) SELECT "starwars_planet"."id", "starwars_planet"."created", "starwars_planet"."edited", "starwars_planet"."name", "starwars_planet"."rotation_period", "starwars_planet"."orbital_period", "starwars_planet"."diameter", "starwars_planet"."climate", "starwars_planet"."gravity", "starwars_planet"."terrain", "starwars_planet"."surface_water", "starwars_planet"."population" FROM "starwars_planet" WHERE "starwars_planet"."id" = 55; args=(55,)
(0.000) SELECT "starwars_planet"."id", "starwars_planet"."created", "starwars_planet"."edited", "starwars_planet"."name", "starwars_planet"."rotation_period", "starwars_planet"."orbital_period", "starwars_planet"."diameter", "starwars_planet"."climate", "starwars_planet"."gravity", "starwars_planet"."terrain", "starwars_planet"."surface_water", "starwars_planet"."population" FROM "starwars_planet" WHERE "starwars_planet"."id" = 10; args=(10,)
(0.000) SELECT "starwars_planet"."id", "starwars_planet"."created", "starwars_planet"."edited", "starwars_planet"."name", "starwars_planet"."rotation_period", "starwars_planet"."orbital_period", "starwars_planet"."diameter", "starwars_planet"."climate", "starwars_planet"."gravity", "starwars_planet"."terrain", "starwars_planet"."surface_water", "starwars_planet"."population" FROM "starwars_planet" WHERE "starwars_planet"."id" = 56; args=(56,)
(0.000) SELECT "starwars_planet"."id", "starwars_planet"."created", "starwars_planet"."edited", "starwars_planet"."name", "starwars_planet"."rotation_period", "starwars_planet"."orbital_period", "starwars_planet"."diameter", "starwars_planet"."climate", "starwars_planet"."gravity", "starwars_planet"."terrain", "starwars_planet"."surface_water", "starwars_planet"."population" FROM "starwars_planet" WHERE "starwars_planet"."id" = 57; args=(57,)
(0.000) SELECT "starwars_planet"."id", "starwars_planet"."created", "starwars_planet"."edited", "starwars_planet"."name", "starwars_planet"."rotation_period", "starwars_planet"."orbital_period", "starwars_planet"."diameter", "starwars_planet"."climate", "starwars_planet"."gravity", "starwars_planet"."terrain", "starwars_planet"."surface_water", "starwars_planet"."population" FROM "starwars_planet" WHERE "starwars_planet"."id" = 58; args=(58,)
(0.000) SELECT "starwars_planet"."id", "starwars_planet"."created", "starwars_planet"."edited", "starwars_planet"."name", "starwars_planet"."rotation_period", "starwars_planet"."orbital_period", "starwars_planet"."diameter", "starwars_planet"."climate", "starwars_planet"."gravity", "starwars_planet"."terrain", "starwars_planet"."surface_water", "starwars_planet"."population" FROM "starwars_planet" WHERE "starwars_planet"."id" = 59; args=(59,)
(0.000) SELECT "starwars_planet"."id", "starwars_planet"."created", "starwars_planet"."edited", "starwars_planet"."name", "starwars_planet"."rotation_period", "starwars_planet"."orbital_period", "starwars_planet"."diameter", "starwars_planet"."climate", "starwars_planet"."gravity", "starwars_planet"."terrain", "starwars_planet"."surface_water", "starwars_planet"."population" FROM "starwars_planet" WHERE "starwars_planet"."id" = 12; args=(12,)
[07/Jul/2017 22:13:22] "POST /graphql? HTTP/1.1" 200 2891
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment