I have a two tables. FIDDLE HERE
DETAILS
+-----+-----------+ | id | valid | +-----+-----------+ | 101 | VALID | | 102 | NOT VALID