4.1 Basic aggregation
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()
4.2 Selection as aggregation
Example codes for comparing SPL, SQL, and Python
SPL Official Website 👉 https://www.scudata.com
SPL Feedback and Help 👉 https://www.reddit.com/r/esProcSPL
SPL Learning Material 👉 https://c.scudata.com
SPL Source Code and Package 👉 https://github.com/SPLWare/esProc
Discord 👉 https://discord.gg/cFTcUNs7
Youtube 👉 https://www.youtube.com/@esProc_SPL