I have days column which I called with :
select days from discount
and the result is like this : group by
What I want is to add group by and get the same result as that picture. How do get the same result with group by? if I add group by days, it gives me the error message "could not identify an equality operator for type JSON"
My expected result is row like this just like select days from discount output result:
["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]
CodePudding user response:
Convert Json to text (cast), then you can:
select days::text
from discount
group by
days::text