Wednesday, 15 August 2012

mysql - How do I get required result using sql -


  select `id`,` zodiac`, 'creation time' to `table 1` where zodiac null The group does not have `Id`;  

The following questions give me the results:

With two columns, and the order in the group is ordered.

  id Cash | Creation Time 1 | 12 | 2015-10-30 07: 59: 11.000000 1 10 | 2014-10-07 08:55 55: 27.000000 1 3 | 2012-10-05 06: 35: 48.000000 2 | 100 | 2015-10-30 07: 59: 11.000000 2 10 | 2014-10-07 08:55 55: 27.000000 3 3 | 2012-10-05 06: 35: 48.000000  


Now I want to get a line from this result, based on the construction time of that line. I need a line with zodiac = 3 because its time of creation is the oldest.

I want to output:

  id | Cash | Creation Time 1 | 3 | 2012-10-05 06: 35: 48.000000 2 | 10 | 2014-10-07 08:55 55: 27.000000 3 3 | 2012-10-05 06: 35: 48.000000  

In my column I have a column, "squinttime" so if anyone can help me how can I do this?

The results I received because of using it:

  SELECT Id, amount, from table 1 to construction time where zodiac revolution There is no Faucet group by ID Board through time limit 1;  

or by using it:

  select 'id', 'zodiac', 'construction time' to 'table 1' where the amount is taped No limit of CREATIONTIME ACC 0,1  

RESULT

  order cash by ID. Creation Time 1 | 3 | 2012-10-05 06: 35: 48.000000  

  select 'id' , `Zodiac`, 'creation time' to 'table 1' Where is the CREATE TIME ACC border 0,1  

No comments:

Post a Comment