Skip to content
Advertisement

Tag: aggregate-functions

Making a pivot table group by users

I want to see user statics, so I made query: It’s working. Here is the result: But I want to make a pivot by Months (last 6 months)… Table: obj_odb_l l ->date column -> l.datum_p -> trunc(l.datum_p,’MONTH’) How can I make a pivot table ? Answer Consider adding the month expression, TRUNC(l.datum_p,’MONTH’), into above aggregate query. Then run the query

If all result equals, return true

I have a simple select that returns a single column: result: {1,1,2} I want to check if all result are 1 then return true and if one column have a 2 return false. Tried something like these: But obviously it returns true if a value is 1 and false if it is 2, instead of just one result. For example:

Advertisement