Skip to content

SQL Finding Missing Dates Between Ranges

I have a table of jobs that have ran for different source systems. These have a “RunDate” and then the FromDate and ToDate. I want to find the gaps where we are missing any dates in the …

how to sort recursive query in PostgreSQL

I have sql query to find all replies from orig comment: WITH RECURSIVE children AS ( SELECT blog_comments_comment.*, 0 AS relative_depth FROM blog_comments_comment WHERE id in %…

Check value if exist in another table within Select Query

I have three tables first table stores user basic Info, the second table stores that user who exist in LDAP directory and third table store common information of both tables. below is the table structure I want name from a table if the value is not matched then check to another table. the desired output looks…