I made it work! I followed the solution in this link:
Basically, I had to add the ::tag qualifier to ifName and use single quotes in the interface ID:
SELECT max(“ifHCInOctets”) FROM “interface” WHERE (“hostname”=‘SW-AR-CD-CBA-011’) AND (ifName::tag=‘Gi1/0/25’) AND time>=now()-10m GROUP BY time(5m)
name: interface
time max