Task 1: List Missing Artifacts

#1 · 1 of 10Free sample
Question

Task 1: List Missing Artifacts

Using the artifacts and inventory_logs tables, find the artifacts that are currently 'checked_out' (i.e. artifacts whose latest log action is 'checked_out' and have not been returned). Return the following columns: artifact_id and artifact_name.
Tables
8 tables · 35 columns
artifacts5 cols
  • artifact_idINTEGER
  • artifact_nameTEXT
  • origin_yearINTEGER
  • valueINTEGER
  • current_locationTEXT
exhibits2 cols
  • exhibit_idINTEGER
  • exhibit_nameTEXT
staff3 cols
  • staff_idINTEGER
  • staff_nameTEXT
  • roleTEXT
visitors4 cols
  • visitor_idINTEGER
  • visitor_nameTEXT
  • originTEXT
  • purposeTEXT
security_logs6 cols
  • log_idINTEGER
  • person_idINTEGER
  • roleTEXT
  • locationTEXT
  • actionTEXT
  • timestampTEXT
inventory_logs4 cols
  • log_idINTEGER
  • artifact_idINTEGER
  • actionTEXT
  • timestampTEXT
artifact_movement_logs5 cols
  • movement_idINTEGER
  • artifact_idINTEGER
  • from_locationTEXT
  • to_locationTEXT
  • timestampTEXT
interaction_logs6 cols
  • interaction_idINTEGER
  • person_idINTEGER
  • roleTEXT
  • artifact_idINTEGER
  • locationTEXT
  • timestampTEXT
Loading the practice editor and dataset…
Your answer(autosaved)
query.sql
Loading editor…
Sign up to unlock

The reference answer is one click away.

Free account unlocks the reference answer, the explanation, and the GPT tutor on every exercise in the library.

  • Reference answer + explanation revealed after each attempt
  • GPT tutor for every problem
  • Progress saved on the platform
  • 1,598 graded exercises
  • Free forever — no credit card
All exercises in SQL Mystery Challenge: The Case of the Vanishing Artifacts