Skip to content

Condition inside a SQL Query

I want to create a query, that will show the word “Passed” if the DATEDIFF(so_date,actual_delivery) = 3 then show “Failed” if not. Can someone help me please?

PostgreSQL Update and return

Let’s say I have a table called t in Postgres: id | group_name | state —————————– 1 | group1 | 0 2 | group1 | 0 3 | group1 | 0 I need to …

Making a custom table from one table

My table is called Storage_Tot which has date, tagid, value components. Below are the two tables (Table A and Table B) I created using SQL query. I essentially ran same query with different tagid …