Implement level and channel for quan
SQL Query debugged.