I am trying to count a substring, while matching different values from another column. The following statement gives me a syntax error on the where clause.
Is the following even possible, and what is the correct syntax?
select address,
datacenter,
ifdesc,
count(substring(ifdesc, 'Ethernet0/*') where ifadminstatus = '1' and ifoperstatus = '1') over (partition by address) mod0_uu,
count(substring(ifdesc, 'Ethernet0/*') where ifadminstatus = '2') over (partition by address) mod0_ad
from ifstatus;