Home > database >  Who have the skilled use of navicat premium
Who have the skilled use of navicat premium

Time:09-23

With navicat premium how to query out each section of the first student's name,

CodePudding user response:

Can query

CodePudding user response:

refer to the second floor qq_29098449 response:
can check out the
you will be familiar with mySQL,

CodePudding user response:

reference qq_44721547 reply: 3/f
Quote: refer to the second floor qq_29098449 response:
can check out the
you will be familiar with mySQL,

Will, have any questions can be + five and five son third wire

CodePudding user response:

 
Example - are as follows:

- see table
The create table t (date varchar (10), id varchar (10), high int, weight int)

- insert the data
Insert into t
Select '2019-03-11', 'wang, 170, 62
Union select '2019-03-11', 'zhang, 171, 63
Union select '2019-03-11', 'xiao li, 172, 64
Union select '2019-02-15', 'wang, 170, 63
Union select '2019-02-15', 'zhang, 171, 63
Union select '2019-02-15', 'xiao li, 172, 64
Union select '2019-01-21', 'wang, 170, 64
Union select '2019-01-21', 'zhang, 171, 62
Union select '2019-01-21', 'xiao li, 172, 64
Union select '2019-01-01', 'wang, 170, 62
Union select '2019-01-01', 'zhang, 171, 67
Union select '2019-01-01', 'xiao li, 172, 64

Query -
Select * from (
Select @ the rowid:=the if (@ rank=id, @ the rowid + 1, 1) newid, date, id, high, weight, @ rank: id=flag
The from t, (select @ the rowid:=0, @ rank:=' ') a
The order by the id, the date desc) t
Where newid=1
  • Related