Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support of 'where exists' operations #73

Open
MartinPetrov8 opened this issue Dec 20, 2018 · 1 comment
Open

Support of 'where exists' operations #73

MartinPetrov8 opened this issue Dec 20, 2018 · 1 comment

Comments

@MartinPetrov8
Copy link

Hi, i have a query i am trying to execute in pandasql but my jupyter environment freezes so i am assuming this is not supported. Query trying to execute:

q1="""
SELECT
DATE(Timestamp) AS date,
COUNT(DISTINCT User) AS user_count
FROM
df pc
WHERE EXISTS (
SELECT *
FROM df pc1
WHERE
pc1.User = pc.User AND
DATE(pc1.Timestamp) < DATE(pc.Timestamp)
)
GROUP BY pc.Timestamp
"""

@aijanai
Copy link

aijanai commented Jun 19, 2020

where exists launches subqueries for each row, are you sure it isn't just computing a goatload of runs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants