#!/usr/bin/php SELECT a.* FROM pabxvirtual_queue_table a join users b on a.accountcode = b.id WHERE a.strategy = 'linear' and b.ativo = 'S'