4.1 基本聚合

 

3.4 逆分组


计算公司员工的平均工资

SPL

A
1 =file(“EMPLOYEE.csv”).import@tc()
2 =A1.avg(SALARY)

SQL

SELECT AVG(SALARY) AS AVERAGE_SALARY FROM EMPLOYEE;

Python

df = pd.read_csv('../EMPLOYEE.csv')
avg_salary = df.SALARY.mean()

4.2 选出聚合
SPL SQL Python 代码示例对比