-1
|--------------------------------------
|  luid |  alti   | lati  |   sdate   | 
|--------------------------------------
|  14  |  11.222  | 11.22 |18-10-2016 |
|  14  |  22.333  | 11.22 |18-10-2016 |
|  12  |  32.111  | 11.22 |18-10-2016 |
|  12  |  11.234  | 11.22 |18-10-2016 |
|  13  |  24.555  | 11.22 |18-10-2016 |
|  16  |  16.000  | 11.22 |19-10-2016 |
---------------------------------------

I want to fetch the unique luid from the table of 18-20-2016 and the total column also.

How can I do it?

Guillaume Jacquenot
  • 11,217
  • 6
  • 43
  • 49
  • 4
    Welcome to StackOverflow. Please note, that this is not a free code-writing service, but we are eager to help fellow programmers (and aspirants) writing their own code. Please read the help topics on [How to ask a good question](http://stackoverflow.com/help/how-to-ask). Afterwards, please update your question with the code you have written thus far in order to complete the task(s) you wish to achieve. – Quintin Balsdon Dec 19 '16 at 08:19
  • Try `DISTINCT`. http://stackoverflow.com/questions/8571902/mysql-select-only-unique-values-from-a-column this can be helped. – Chonchol Mahmud Dec 19 '16 at 08:23

2 Answers2

0

Try,

SELECT DISTINCT(Column_Name) AS Column_Name FROM Table_Name ORDER BY Column_Name DESC;
0

TRY This SELECT luid from table WHERE sdate="required date" Group By luid

rohitr
  • 371
  • 2
  • 11