I have this query:
Select
Sysdate,Sum(Count(P.Init_Dtime))
From Player p,player_source ps
Where
Ps.Group_Id In (44,9,42,15,23,73,45,33,69,63,7,49,96,81,28,57,98,74,92,38)
And P.Player_Id=Ps.Player_Id
and
Trunc(p.Init_Dtime) > Trunc(Sysdate) - 7
And
Trunc(P.Create_Dtime) >= To_Date('2012-mar-01','yyyy-mon-dd')
And Trunc(P.Create_Dtime) < To_Date('2015-sep-9','yyyy-mon-dd')
Group By Trunc(P.Init_Dtime)
Order By Trunc(P.Init_Dtime) Asc
I am using the "IN" function to include only Group_IDs that have certain numbers. The Group_ID column can have a value from 1-100. How do I change this query so the result includes all Group_Id numbers that are not (44,9,42,15,23,73,45,33,69,63,7,49,96,81,28,57,98,74,92,38)?
You can use NOT to negate the expression.
So you could say :
Where
Ps.Group_Id NOT IN (44,9 ...)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With