Home > database >  Please comment how mysql achieve the function similar to other pseudo columns in the database
Please comment how mysql achieve the function similar to other pseudo columns in the database

Time:10-10

Want to pseudo column is used to implement the following function, but found no direct pseudo column MySQL function,,,

Topic: check which service has the highest HuoJiangShu,

Data dictionary:

The Sales, after-sales service table)
Salesno int after-sales service number;
Sname varchar after-sales service projects;

The Client (the customer table)
Clientno int customer number;
Cname varchar customer name;
Empno int employee number;
The Age int Age;
Ctele varchar customer calls;
Houseno varchar number;
Sex varchar Sex;
Goodsno varchar prize number;
Salesno int after-sales service number;

The customer information table:

After-sales service table:


Kindly bosses, help me take a look at this how to write, and the pseudo column does need to use,,,

CodePudding user response:

This is your initial idea,,, (not finish)

CodePudding user response:

SELECT * FROM (

SELECT s.s name, COUNT (*) as the FROM CNT sales s LEFT JOIN client c ON s.s alesno=c.s. alesno GROUP BY s.s alesno

B) as the ORDER BY CNT desc
Limit 1;
Has been solved, need not trouble bosses,,,

CodePudding user response:

Holiday also in work, good!

CodePudding user response:

big brother, I also read undergraduate course,,, this is your final project,,,

CodePudding user response:

big brother, I also read undergraduate course,,, this is your final project,,,
  • Related