Data Interview Qs - Occupation Query

InterviewQs

Occupation Query

SQL Database Querying

Forward this email to a friend or colleague and challenge them to solve it.

You're given a table called "PersonOccupation", which is outlined below. Using SQL, pivot the "occupation" column so that each name is sorted alphabetically and displayed underneath its corresponding occupation. The output column headers should be data scientist, analyst, engineer, and program manager, respectively.

Table: PersonOccupation:

Column Name Data Type Description
name String Name of person
occupation string Person's occupation

Sample records for PersonOccupation:

name occupation
sally data scientist
terry analyst
mary engineer
sandy program manager
erik program manager
crystal analyst

Example query output:

data scientist analyst engineer program manager
sally crystal mary erik
NULL terry NULL sandy



 

Congratulations! You’ve accumulated 153 questions since joining our email list. Create a premium account to access detailed solutions to each problem (including this one) + our new Case studies.


Was this email forwarded to you? You can join our list here to receive questions

How did you like today's question?

15411 Boischatel, Montreal, QC, H9H1Y7, Canada
Don't want to get these emails anymore? We'll forgive you if you unsubscribe

Older messages

Filtering student information with Pandas

Wednesday, June 23, 2021

Data Analysis, Python, Pandas, Data Manipulation, Filtering, InterviewQs Filtering student information with Pandas Data Analysis Python Pandas Data Manipulation Filtering Forward this email to a friend

Drawing cards from a standard deck

Monday, June 21, 2021

Statistics, Probability Theory, InterviewQs Drawing cards from a standard deck Statistics Probability Theory Forward this email to a friend or colleague and challenge them to solve it. We have a

Print common characters using Python

Friday, June 18, 2021

Python, String Manipulation, InterviewQs Print common characters using Python Python String Manipulation Forward this email to a friend or colleague and challenge them to solve it. Given two strings,

Calculating monthly revenue growth in SQL

Wednesday, June 16, 2021

SQL, Database Querying, Lag Function, InterviewQs Calculating monthly revenue growth in SQL SQL Database Querying Lag Function Forward this email to a friend or colleague and challenge them to solve it

Volume weighted price average (VWAP)

Monday, June 14, 2021

Data Analysis, Python, Pandas, Data Manipulation, Normalization, External Dataset, InterviewQs Volume weighted price average (VWAP) Data Analysis Python Pandas Data Manipulation Normalization External

You Might Also Like

🤓 The Meta Quest Might Be the VR Steam Deck Soon — Games to Play After Finishing Wordle

Friday, April 26, 2024

Also: Why a Cheap Soundbar Is Better Than Nothing, and More! How-To Geek Logo April 26, 2024 Did You Know TMI: Rhinotillexomania is the medical term for obsessive nose picking. 🖥️ Get Those Updates

JSK Daily for Apr 26, 2024

Friday, April 26, 2024

JSK Daily for Apr 26, 2024 View this email in your browser A community curated daily e-mail of JavaScript news A Solid primer on Signals with Ryan Carniato (JS Party #320) Ryan Carniato joins Amal

So are we banning TikTok or what?

Friday, April 26, 2024

Also: Can an influencer really tank an $800M company? View this email online in your browser By Haje Jan Kamps Friday, April 26, 2024 Image Credits: Jonathan Raa/NurPhoto / Getty Images Welcome to

[AI Incubator] 300+ people are already in. Enrollment closes tonight at 11:59pm PT.

Friday, April 26, 2024

How to decide if you're ready. ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Daily Coding Problem: Problem #1423 [Medium]

Friday, April 26, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Google. You are given an array of nonnegative integers. Let's say you start at the

Data science for Product Managers

Friday, April 26, 2024

Crucial resources to empower you with data that matters. ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Inner Thoughts

Friday, April 26, 2024

'The Inner Circle' Comes Around... Inner Thoughts By MG Siegler • 26 Apr 2024 View in browser View in browser If you'll allow me a brief meta blurb this week (not a Meta blurb, plenty of

Digest #135: Kubernetes Hacks, Terraform CI/CD, HashiCorp Acquisition, AWS Data Transfer Monitoring

Friday, April 26, 2024

Explore Advanced Kubernetes Techniques, Dive Into Terraform CI/CD Frameworks, Monitor AWS Data Transfer, and Explore Cloud Security with Gitleaks! ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

Build5Nines Newsletter - April 25, 2024

Friday, April 26, 2024

View this email in your browser Build5Nines Build5Nines Newsletter Thank you for subscribing! I look forward to sharing with you the latest cloud news, technical help, and other thoughts around DevOps

Ranked | Which City Has the Most Billionaires in 2024? 💰

Friday, April 26, 2024

Just two countries account for half of the top 20 cities with the most billionaires. And the majority of the other half are found in Asia. View Online | Subscribe Presented by: Discover what drives