-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy path5_optimal_skills.sql
239 lines (235 loc) · 6.27 KB
/
5_optimal_skills.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
/*
Answer: What are the most optimal skills to learn (aka it’s in high demand and a high-paying skill)?
- Identify skills in high demand and associated with high average salaries for Data Analyst roles
- Concentrates on remote positions with specified salaries
- Why? Targets skills that offer job security (high demand) and financial benefits (high salaries),
offering strategic insights for career development in data analysis
*/
-- Identifies skills in high demand for Data Analyst roles
-- Use Query #3
WITH skills_demand AS (
SELECT
skills_dim.skill_id,
skills_dim.skills,
COUNT(skills_job_dim.job_id) AS demand_count
FROM job_postings_fact
INNER JOIN skills_job_dim ON job_postings_fact.job_id = skills_job_dim.job_id
INNER JOIN skills_dim ON skills_job_dim.skill_id = skills_dim.skill_id
WHERE
job_title_short = 'Data Analyst'
AND salary_year_avg IS NOT NULL
AND job_work_from_home = True
GROUP BY
skills_dim.skill_id
),
-- Skills with high average salaries for Data Analyst roles
-- Use Query #4
average_salary AS (
SELECT
skills_job_dim.skill_id,
ROUND(AVG(job_postings_fact.salary_year_avg), 0) AS avg_salary
FROM job_postings_fact
INNER JOIN skills_job_dim ON job_postings_fact.job_id = skills_job_dim.job_id
INNER JOIN skills_dim ON skills_job_dim.skill_id = skills_dim.skill_id
WHERE
job_title_short = 'Data Analyst'
AND salary_year_avg IS NOT NULL
AND job_work_from_home = True
GROUP BY
skills_job_dim.skill_id
)
-- Return high demand and high salaries for 10 skills
SELECT
skills_demand.skill_id,
skills_demand.skills,
demand_count,
avg_salary
FROM
skills_demand
INNER JOIN average_salary ON skills_demand.skill_id = average_salary.skill_id
WHERE
demand_count > 10
ORDER BY
avg_salary DESC,
demand_count DESC
LIMIT 25;
-- rewriting this same query more concisely
SELECT
skills_dim.skill_id,
skills_dim.skills,
COUNT(skills_job_dim.job_id) AS demand_count,
ROUND(AVG(job_postings_fact.salary_year_avg), 0) AS avg_salary
FROM job_postings_fact
INNER JOIN skills_job_dim ON job_postings_fact.job_id = skills_job_dim.job_id
INNER JOIN skills_dim ON skills_job_dim.skill_id = skills_dim.skill_id
WHERE
job_title_short = 'Data Analyst'
AND salary_year_avg IS NOT NULL
AND job_work_from_home = True
GROUP BY
skills_dim.skill_id
HAVING
COUNT(skills_job_dim.job_id) > 10
ORDER BY
avg_salary DESC,
demand_count DESC
LIMIT 25;
/*
Here's a breakdown of the most optimal skills for Data Analysts in 2023:
High-Demand Programming Languages: Python and R stand out for their high demand, with demand counts of 236 and 148 respectively. Despite their high demand, their average salaries are around $101,397 for Python and $100,499 for R, indicating that proficiency in these languages is highly valued but also widely available.
Cloud Tools and Technologies: Skills in specialized technologies such as Snowflake, Azure, AWS, and BigQuery show significant demand with relatively high average salaries, pointing towards the growing importance of cloud platforms and big data technologies in data analysis.
Business Intelligence and Visualization Tools: Tableau and Looker, with demand counts of 230 and 49 respectively, and average salaries around $99,288 and $103,795, highlight the critical role of data visualization and business intelligence in deriving actionable insights from data.
Database Technologies: The demand for skills in traditional and NoSQL databases (Oracle, SQL Server, NoSQL) with average salaries ranging from $97,786 to $104,534, reflects the enduring need for data storage, retrieval, and management expertise.
[
{
"skill_id": 8,
"skills": "go",
"demand_count": "27",
"avg_salary": "115320"
},
{
"skill_id": 234,
"skills": "confluence",
"demand_count": "11",
"avg_salary": "114210"
},
{
"skill_id": 97,
"skills": "hadoop",
"demand_count": "22",
"avg_salary": "113193"
},
{
"skill_id": 80,
"skills": "snowflake",
"demand_count": "37",
"avg_salary": "112948"
},
{
"skill_id": 74,
"skills": "azure",
"demand_count": "34",
"avg_salary": "111225"
},
{
"skill_id": 77,
"skills": "bigquery",
"demand_count": "13",
"avg_salary": "109654"
},
{
"skill_id": 76,
"skills": "aws",
"demand_count": "32",
"avg_salary": "108317"
},
{
"skill_id": 4,
"skills": "java",
"demand_count": "17",
"avg_salary": "106906"
},
{
"skill_id": 194,
"skills": "ssis",
"demand_count": "12",
"avg_salary": "106683"
},
{
"skill_id": 233,
"skills": "jira",
"demand_count": "20",
"avg_salary": "104918"
},
{
"skill_id": 79,
"skills": "oracle",
"demand_count": "37",
"avg_salary": "104534"
},
{
"skill_id": 185,
"skills": "looker",
"demand_count": "49",
"avg_salary": "103795"
},
{
"skill_id": 2,
"skills": "nosql",
"demand_count": "13",
"avg_salary": "101414"
},
{
"skill_id": 1,
"skills": "python",
"demand_count": "236",
"avg_salary": "101397"
},
{
"skill_id": 5,
"skills": "r",
"demand_count": "148",
"avg_salary": "100499"
},
{
"skill_id": 78,
"skills": "redshift",
"demand_count": "16",
"avg_salary": "99936"
},
{
"skill_id": 187,
"skills": "qlik",
"demand_count": "13",
"avg_salary": "99631"
},
{
"skill_id": 182,
"skills": "tableau",
"demand_count": "230",
"avg_salary": "99288"
},
{
"skill_id": 197,
"skills": "ssrs",
"demand_count": "14",
"avg_salary": "99171"
},
{
"skill_id": 92,
"skills": "spark",
"demand_count": "13",
"avg_salary": "99077"
},
{
"skill_id": 13,
"skills": "c++",
"demand_count": "11",
"avg_salary": "98958"
},
{
"skill_id": 186,
"skills": "sas",
"demand_count": "63",
"avg_salary": "98902"
},
{
"skill_id": 7,
"skills": "sas",
"demand_count": "63",
"avg_salary": "98902"
},
{
"skill_id": 61,
"skills": "sql server",
"demand_count": "35",
"avg_salary": "97786"
},
{
"skill_id": 9,
"skills": "javascript",
"demand_count": "20",
"avg_salary": "97587"
}
]
*/