Skip to content

Tag: subquery

Can this be done as a SQL VIEW

I have a SQL Server table of Customer’s Events: There can be many EventTypes for the same customer in one day. EventTypes are like 1 – CheckIn 2 – CheckOut 3 – ExamStart 4 – ExamEnd Now I want to select Customers that are currently (today) on premises. That’s Clients who ha…

Oracle “NOT IN” not returning correct result?

I’m comparing two tables that share unique values between each other using NOT IN function in Oracle but I’m getting the output is: 521254 for all charging ids –< this is the total unique charging ID’s in BILLINGDB201908 Now I want to find id’s in table BILLINGDB201908 that al…