I need to resolve a simple exercise requesting to report the amount of books sold between 1:00 pm and 5:30 pm on all dates.
I was able to pull between 13h and 17h but not with the "17h30" minutes.
I did so:
SELECT SUM(quantidade)
FROM notafiscal WHERE extract(hour FROM data_compra) BETWEEN 13 AND 17;
I tried using hour_minute instead of hour and by '17: 30 'but back as null any result.