skip to Main Content

Postgresql – Selecting data using jsonb data in WHERE clause

I have the below table - assume tags column always have top level string keys: name(TEXT) | tags(jsonb) -----------+------------------------------------------------------- teamA | {"color": "green", "zone": "primary"} teamB | {"color": "green", "zone": "primary", "role": "user"} teamC | {"uid": "32-232-2dswdwsd", "availability": "condensed"} Let's…

VIEW QUESTION

Postgresql – How to speed up range joins in bigquery

Doing self join with same table with range condition. The below is sql statement. select current_rec .* ,compare_rec.employee_id as less_salary_employee from hr.employees current_rec left join hr.employees compare_rec on current_rec.hire_date < compare_rec .hire_date and current_rec.salary < compare_rec.salary order by current_rec .employee_id…

VIEW QUESTION
Back To Top
Search