Skip to content
Advertisement

Tag: select

How to fix Encoding error utf-8 – PostgreSQL

I am following instructions online to create a database in pgAdmin4. I have successfully imported a csv file and created a table. However, I cannot select anything from the table. My code is: SELECT * FROM transfers; Error message is: ‘utf-8’ codec can’t decode byte 0xc3 in position 0: unexpected end of data Running ‘show server_encoding’ gives “UTF8” in the

Extract the record for last hour for specific date

I am trying to extract the last hour (TKT_DT) record for number of tickets (TKT_DN) from sales table (PS_TKT_HIST) for specific date (BUS_DAT). I have the following code but it extracts the number of tickets (TKT_NO) for each hour. I want to filter the last hour only. Here is the code I used: I get the flowing results I want

Advertisement