List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:June 3 1999 1:46pm
Subject:select distinct on timestamp(8) column
View as plain text  
>>>>> "Davor" == Davor Cengija <davor@stripped> writes:

Davor>        If I try 
Davor> SELECT DISTINCT my_column FROM my_table;

Davor>        where my_column is TIMESTAMP(8), the results contains multiple
Davor>        entries (as expected, because TIMESTAMP(8) contains the same
Davor>        info as TIMESTAMP(14) but it just displays the first 8
Davor>        digits).

Davor> | 19990523 |
Davor> | 19990523 |
Davor> | 19990527 |
Davor> | 19990527 |
Davor> | 19990527 |
Davor> | 19990527 |
Davor> | 19990528 |
Davor> | 19990528 |
Davor> | 19990528 |
Davor> | 19990528 |
Davor> | 19990528 |
Davor> | 19990528 |
Davor> | 19990601 |

Davor>        how to write a query which will return just single entry for
Davor>        each day?



Davor> -- 
Davor>       v
Davor> Davor Cengija
Davor> davor@stripped
Davor> ===================================================
Davor> "Doktore, malo sam neodluèan... a mo¾da i nisam..."


Davor> ---------------------------------------------------------------------
Davor> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
Davor> posting. To request this thread, e-mail mysql-thread4277@stripped

Davor> To unsubscribe, send a message to the address shown in the
Davor> List-Unsubscribe header of this message. If you cannot see it,
Davor> e-mail mysql-unsubscribe@stripped instead.
Thread
select distinct on timestamp(8) columnDavor Cengija1 Jun
  • RE: select distinct on timestamp(8) columnDon Read1 Jun
    • RE: select distinct on timestamp(8) columnDavor Cengija2 Jun
  • select distinct on timestamp(8) columnMichael Widenius3 Jun