skip to Main Content

Nested SQL call – Postgresql

EDIT: As requested, our table schema is, posts: postid (primary key), post_text comments: commentid (primary key) , postid (foreign key referencing posts.postid), comment_text replies replyid (primary key) commentid (foreign key referencing comments.commentid) reply_text I have the tables posts, comments, and…

VIEW QUESTION

Replace calculated negative values with 0 in PostgreSQL

I have a table my_table: case_id first_created last_paid submitted_time 3456 2021-01-27 2021-01-29 2021-01-26 21:34:36.566023+00:00 7891 2021-08-02 2021-09-16 2022-10-26 19:49:14.135585+00:00 1245 2021-09-13 None 2022-10-31 02:03:59.620348+00:00 9073 None None 2021-09-12 10:25:30.845687+00:00 6891 2021-08-03 2021-09-17 None I created 2 new variables: select *,…

VIEW QUESTION
Back To Top
Search