so i have table name report the detail like this
No(autoincrement) Code Stats(bool)
--------------------------------------
1 F01 0
2 F02 0
3 F03 0
4 F03 1
5 F03 1
6 F04 1
7 F04 0
so the scenario is if code have value for stats is true then show them all and if the code didnt have value true then only show the false so the result i want is (note : one code always have 1 record for value false)
No(autoincrement) Code Stats
--------------------------------------------
1 F01 0
2 F02 0
4 F03 1
5 F03 1
6 F04 1
because f01 and f02 didnt have value stats true then show them and for case f03 and f04 because have value true for stat show them all true and ignore the false value
so how the query for i get the result