I have the following query
SELECT DISTINCT id_unidad, economico, plates, mark, model FROM units
JOIN LEFT available on available.id_unit1 = units.id_unit
where date1 <> 2019-04-03 & # 39 ;;
Where the device table contains the fields to display (in the query) and the available table contains the fields id_available, date1, and id_unit1.
What I'm looking for is that the user enters a date and the system only displays units that are not associated with that date in the available table (which are not repeated).
But you have records with different date1 and the same unit_id1
in this case, the query shows me all the units.
I hope to give to understand and thank in advance any contribution Greetings!