Home > database >  Questions about VFP9.0 scores ranking
Questions about VFP9.0 scores ranking

Time:09-19

The rank (rank)
Create Cursor T1 (student id, name C (10), the scores of N (1, 2))
Insert Into T1 Values (1, "student 1," 900)
Insert Into T1 Values (2, "student 2," 360)
Insert Into T1 Values (3, "student 3", 800)
Insert Into T1 Values (4, students "4", 630)
Insert Into T1 Values (5, "students 5", 240)
Insert Into T1 Values (6, "students' 6", 90)
Insert Into T1 Values (7, 7 "students", 240)
Insert Into T1 Values (8, "students' 8", 900)
Insert Into T1 Values (480) 9, "9" student,
Insert Into T1 Values (10, students "10", 108)
Browse

* - VFP9.0 (sub-queries)
Select A. *, (Select Count (*) From T1 Where a. B grade & lt;=b. score) As ranking From T1 Order By placing A

Could you tell me the a. * come from A table, look not to understand, but the actual operation is A success

CodePudding user response:

Ever recommend some good articles VFP command skills give me to learn, online are scattered, need to slowly looking for

CodePudding user response:

The Select... The From T1 A ...

CodePudding user response:

refer to the second floor DKFDTF response:
Select... The From T1 A ...

It is for this, the term is the alias table

CodePudding user response:

T1 - A & gt; T1 as A

CodePudding user response:

Select A. *, (Select Count (*) From T1 Where a. B grade & lt;=b. score) As the From T1 A place Order By ranking, I understand the words, two aliases for T1, embedded for T1 B; The from t1 a peripheral; Belong to oneself give oneself

CodePudding user response:

This query problem is tied for the league entirely wrong

CodePudding user response:

Coordinate all calculate by low rank, is not wrong!
  •  Tags:  
  • VFP
  • Related