4.1 Basic aggregation

 

https://c.scudata.com/article/1729070474529


Calculate the average salary of company employees.

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()

https://c.scudata.com/article/1729154155588

https://c.scudata.com/article/1728995786121