Current statistics of each title type corresponds to the current average wage of employees (to_date = '9999-01-01') corresponding salary. The results are given title, and the average wage avg

 

 

 I personally feel that do not add AND t.to_date = '9999-01-01' This restriction,

Because when the two tables with the same job number, s date have been restricted in the table, it can be described

Data piece of titles tables connected must be effective, I do not know if I understand this correctly!

 

 Alternatively, where conditions may be used, so do not connect the two tables

 

 

where conditions are selected to satisfy several criteria in two rows in the table, and then out of the selected data group, using the final polymerization function avg

Guess you like

Origin www.cnblogs.com/jiguang321/p/12008179.html