Skip to content

How to join tables on calculation – Oracle [closed]

i am trying to join these two tables, but I can only do so if I change values of columns while joining like “substr(to_char(p.personnummer),3)” and “substr(k.ip_id,1,10)” . Can anyone tell me what is …

How self join works [closed]

Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 2 years ago. Improve this question I hav…

Left join matching between dates

I am trying to pair the date of a national holiday with time bucket boundaries. I would like to left join against buckets. So I can identify if a holiday falls within a certain time frame has_holiday. With the following query, I receive a Query error: Query error: LEFT OUTER JOIN cannot be used without a cond…

Oracle SQL group by then sum

I have a table CUST_LOG with data below. How should I select above as below result? I want to group by CUST_ID then sum each status count by CUST_ID? I used OUTER JOIN but not work. The only way I found is use UNION clause as the following sql, but it is too complicated if there are many status. Answer