May 06 2024 08:39 AM
I have this code in oracle
if (Income == "NULL") {0}
else if (Emplid == Prior(Emplid) && Income != Prior(Income)) {1}
else if (Emplid != Prior(Emplid) && Income != "Unreported") {1}
else {0}
I did this
May 06 2024 10:26 PM
May 17 2024 11:51 AM
Thank you @olafhelper
Here is an image about what result I need it
Emplid | Term | IncomeYY | Count_Income |
1 | 2213 | Unreported | 0 |
1 | 2237 | $35,000 or More | 1 |
1 | 2237 | $35,000 or More | 0 |
1 | 2243 | Unreported | 0 |
1 | 2243 | $35,000 or More | 1 |
1 | 2245 | Unreported | 0 |
May 20 2024 10:13 PM
Here is an image about what result I need it
Fine,m and what is the source data?
Again, please post table design as DDL, some sample data as DML statement and the expected result.