I would like to "convert" a SQL query in a solr command.
I have 2 SQL tables "jobs" and "companies".
Today to count the number of jobs published by a company, I run this query :
select c.id, count(j.id)
from companies c
left join jobs j on j.client_id = c.id
group by c.id;
In other hand I have 2 collections "jobs" and "companies" there is the same fields.
How can I "convert" the query below in solr ?
I saw it's possible to make a join with a parent collection, but I don't want to create a hierarchy between job and company (it doesn't make sense).