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

Some queries do not work anymore with postgres #238

Open
vserret opened this issue Dec 22, 2023 · 2 comments
Open

Some queries do not work anymore with postgres #238

vserret opened this issue Dec 22, 2023 · 2 comments
Assignees

Comments

@vserret
Copy link
Contributor

vserret commented Dec 22, 2023

No description provided.

@vserret vserret changed the title substring does not work anymore with postgres Some queries do not work anymore with postgres Dec 22, 2023
@vserret
Copy link
Contributor Author

vserret commented Dec 22, 2023

SELECT SUBSTRING(education FROM 1 FOR 4) AS m, COUNT(*) AS my_count FROM census GROUP BY education;

SELECT age AS age1, SUM(education_num) AS s1 FROM census WHERE age IS NOT NULL GROUP BY age;

SELECT COUNT(*) AS c1 FROM census WHERE marital_status ILIKE 'W%';

SELECT age, CASE WHEN age IS Null THEN 'Null' ELSE 'NotNull' END AS case_age, COUNT(*) AS c1 FROM census GROUP BY age;

@vserret
Copy link
Contributor Author

vserret commented Dec 22, 2023

this query does not pass the consistency test (the original query and the query from the Relation should return the same results)

SELECT SUM(log_capital_loss) AS res1, SUM(sqrt_capital_loss) AS res2, SUM(inv_capital_loss) AS res3 FROM (SELECT LOG(capital_loss + 1.) AS log_capital_loss, SQRT(capital_loss) AS sqrt_capital_loss, 1/(capital_loss+1) AS inv_capital_loss FROM census) AS subquery;

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