Question d’entretien chez Pattern

Write an intermediate SQL query based on some sales data tables. Write a function in python to calculate the z score of an array.