DROP USER 'cart'@'%'

CREATE USER 'cart'@'%' IDENTIFIED BY PASSWORD 'cart2023';
CREATE USER 'cart'@'%' IDENTIFIED BY PASSWORD '*DC4D6DF107711946088A6FA2ED3AD2074BC8F1BA';--/cart2023/

GRANT ALL PRIVILEGES ON cart.* TO 'cart'@'%';
FLUSH PRIVILEGES;


SELECT DISTINCT Publisher.*
FROM Publisher
    INNER JOIN Availability ON Availability.publisherId = Publisher.id
WHERE
    Availability.isActive = true
    AND ( (
            Availability.dayOfMonth IS NOT NULL
            AND Availability.startTime <= '2023-03-30 13:00:00'
            AND Availability.endTime >= '2023-03-30 13:00:00'
            AND DAYOFMONTH(Availability.startTime) = DAYOFMONTH('2023-03-30')
        )
        OR (
            Availability.dayOfMonth IS NULL
            AND DAYOFWEEK(Availability.startTime) = DAYOFWEEK('2023-03-30')
            AND Availability.startTime <= '2023-03-30 13:00:00'
            AND Availability.endTime >= '2023-03-30 13:00:00'
        )
    );

SELECT DISTINCT Publisher.*
FROM Publisher
    INNER JOIN Availability ON Availability.publisherId = Publisher.id
WHERE
    Availability.isActive = true
    AND (Availability.dayOfMonth = 5) clfuyo33e005aknvchf1wm3bu All publishers: 121;

 (118) unique,
3 dupliates: clfuymbf6000sknvc9bvas2ee georgiggg @gmail.com,
2;

clfuymcbu000yknvcmjlg27qn julanda_debora@yahoo.com,2;

clfuymbpn000uknvckz1g9cu5 my.room.is.a.relaxing.place @gmail.com,
2
SELECT DISTINCT Availability.*
FROM Availability
WHERE Availability.Pu