You candirectly query it like: List opportunities = [SELECT OwnerId, Amount, Probability FROM OPPORTUNITY where Amount > 0 and LastModifiedDate < LAST_N_DAYS:7];
No need to declare variable and its value fisrt,
You candirectly query it like: List opportunities = [SELECT OwnerId, Amount, Probability FROM OPPORTUNITY where Amount > 0 and LastModifiedDate < LAST_N_DAYS:7];
No need to declare variable and its value fisrt,