output query data in rating links