Based on the following tables named 'empdept_data' , if you execute the PostgreSQL query given below, what will be the o Tablet: empdept_data 8 id W 9 3211 1239 2947 name dept Alice Smith HR Lisa Davis IT Bob Jones HR Mary Brown John Wilson purchase Paul Miller IT sal 30000 70000 30000 50000 35000 10 1558 3130 3570 11 45000 Query: 2 SELECT id, name, dept, sal, LAG(sal) OVER (PARTITION BY dept ORDER BY sal) prev_val FROM empdept_data; 3 Output 1. 4. id 3211 sal 30000 30000 5 2947 3570 name dept Alice Smith HR Bob Jones HR Paul Miller IT Mary Brown IT Lisa Davis IT John Wilson purchase 45000 prev_value 30000 [null] 50000 70000 (null) (null) 1558 50000 1239 70000 35000 3130 2. O Type here to search O
Answers
Answered by
0
Explanation:
Based on the following tables named 'empdept_data' , if you execute the PostgreSQL query given below, what will be the o Tablet: empdept_data 8 id W 9 3211 1239 2947 name dept Alice Smith HR Lisa Davis IT Bob Jones HR Mary Brown John Wilson purchase Paul Miller IT sal 30000 70000 30000 50000 35000 10 1558 3130 3570 11 45000 Query: 2 SELECT id, name, dept, sal, LAG(sal) OVER (PARTITION BY dept ORDER BY sal) prev_val FROM empdept_data; 3 Output 1. 4. id 3211 sal 30000 30000 5 2947 3570 name dept Alice Smith HR Bob Jones HR Paul Miller IT Mary Brown IT Lisa Davis IT John Wilson purchase 45000 prev_value 30000 [null] 50000 70000 (null) (null) 1558 50000 1239 70000 35000 3130 2. O Type here to search O
Similar questions