question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Distinct is not working

See original GitHub issue

Hi I have one sql query with distinct closer

SELECT DISTINCT customerNumber , amount,checkNumber FROM payments WHERE paymentDate > DATE('2003-01-01') if i am using this query to parser that i am not getting distinct column same thing not coming another query i give one more example please check this test case…

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
wumpzcommented, Jul 4, 2018

Aha. Now I know, what you mean. The column within distinct is only set if you write distinct (col). You wrote a global distinct which processes all columns within your select.

0reactions
devanshusharma19commented, Jul 9, 2018

bro please check this query…

Read more comments on GitHub >

github_iconTop Results From Across the Web

select distinct not working as expected - Stack Overflow
I want unique student ids as well as their respective college ids. ... select studentId,collegeID from STDNT_GROUP where studentId in(select ...
Read more >
Select Distinct is returning duplicates - Experts Exchange
SELECT DISTINCT is a “row operator”, not a function, and not magic. It will evaluate ALL of the columns that you have listed...
Read more >
DISTINCT is not working as expected in Marketing Cloud
Distinct works as if all fields in the select statement are primary keys. So this means in your query you are looking for...
Read more >
distinct not working — oracle-tech
When i put distinct on select, statement does not work, it keeps executing and it shows no result. select distinct d.a, d.b, d.c,...
Read more >
DISTINCT is not a SQL Function - Towards Data Science
Apply SELECT DISTINCT to a subset of columns in SQL. Discussing about SELECT DISTINCT keywords in SQL and why DISTINCT is not a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found