SQL To Check Resource Queues