select ArticuloRenglonID from articulorenglon where ArticuloRenglonInactivo = 0 and articuloid = '' and ArticuloRenglonCantidadMinima <= and ArticuloRenglonID in (select articulorenglonid from articulodepositorenglon where LocalAutorizadoId = 41 and articulodepositorenglon.articuloid = '') order by ArticuloRenglonCantidadMinima DESC LIMIT 10