4
The problem is to return a SELECT with only those schedules that are no longer accepted by the user. I’m trying to use the schedule table that has already been accepted, which has both the user ID and the schedule that he accepted to filter the schedule.
Table of accepted schedules
| SCHEDULE_ID | USER_ID |
------------------------------
25 | 26 |
41 | 26 |
41 | 26 |
42 | 29 |
The keys come from the table link with the following tables:
Schedule table created
SCHEDULE_ID | TITULO | DAILY_PRICE | CLIENT_ID |
----------------------------------------------------------
41 | Padaria | 290.00 | 1 |
42 | Confeitaria | 350.00 | 2 |
25 | Lavanderia | 350.00 | 3 |
List of Registered Deliverers
USER_ID | NAME |
--------------------------
25 | João |
26 | Maria |
29 | Claúdio |
I’m not really used to using SQL statements yet, so I couldn’t develop a query that would return the values, without them being repeated for example.
That’s where my question lies, more than one user can accept a certain schedule. And I’m after a query that returns the schedules that were not accepted by the user, thanks in advance.
– wagnermps
This query of mine solved your initial problem? Check for me and we worked on a second.
– Luiz Santos