Hi Folks, We are trying to construct a tabular vie...
# general
s
Hi Folks, We are trying to construct a tabular view from data in pinot. Eg: Get the list of top 10 userId's from Table A, get names of those users using lookup from Table B. Is this supported using lookup?
k
Yes. Lookup joins are supported. In your case, it might be better to use sub query in the filter clause
👍 1
s
The list of userId's is fetched dynamically and for those user ID's we want to get the username. We want to achieve the functionality of the below sample query through lookup:
Copy code
select
	a.username,
	a.email,
	count(*)
from
	tableA a
	join TableB b 
	on a.userid = b.userid
	and a.orgid = b.orgid
group by
	b.userid, a.username, a.email
order by
	count(*) desc limit 10;
also tagging @User
Any pointers on this?