Data Interview Qs - Animal weights
Animal weights
SQL Database Querying
Suppose you're given the below tables, containing animal weights, as well as a directory of zoos:
Table name: animal_weights
animal_ID | weight_lbs | zoo_ID |
---|---|---|
09992 | 1040 | 012 |
099929 | 1090 | 012 |
012993 | 2190 | 011 |
009821 | 750 | 011 |
096673 | 580 | 011 |
01411 | 690 | 012 |
01415 | 695 | 009 |
01410 | 690 | 009 |
01117 | 1000 | 009 |
Table name: zoo_directory
zoo_ID | zoo_name |
---|---|
012 | Detroit Zoo |
011 | LA Zoo |
009 | NY Zoo |
Given the above, write a SQL query to return the second heaviest animal in the table from each zoo. In addition to the zoo_ID, return the zoo_name from the zoo_directory table.
Click here to view these tables in an interactive SQL fiddle.
//Click here to view this problem in an interactive Colab (Jupyter) notebook.
Want the solutions? Upgrade to premium to access detailed solutions to each problem (including this one).
Was this email forwarded to you? You can join our list here to receive questions
Unsubscribe
Older messages
Parking space probabilities
Monday, April 19, 2021
Data Interview Qs Parking space probabilities Data Analysis Python Pandas External Dataset Data Manipulation Data Visualization Statistics Probability Mass Function Suppose you're analyzing the
Sorting algorithm
Wednesday, April 14, 2021
Data Interview Qs Sorting algorithm Python Algorithms Given the following Python function, write out what the output would be at each stage: n = 1 while n < 3: m = n + 1 while m < 4: m += 1 print
Avg. sales by location in SQL
Monday, April 12, 2021
Data Interview Qs Avg. sales by location in SQL SQL Database Querying You are given the below tables, showing Store, Product, and Sales information for a chain of grocery stores. The columns are
Cleaning and analyzing employee data
Friday, April 9, 2021
Data Interview Qs Cleaning and analyzing employee data Data Analysis Python Pandas Data Manipulation Data Cleaning Below is a snippet from a table that contains information about employees that work at
Life expectancy
Wednesday, April 7, 2021
Data Interview Qs Life expectancy Statistics Probability Theory Conditional Probability Suppose you're analyzing a population of 100000 people, and you're trying to understand life expectancy.
You Might Also Like
Happening TUESDAY! Follow Our Coverage of Apple’s Spring Announcement
Monday, May 6, 2024
iPhone Life magazine Follow Our Coverage of Apple's Latest Announcement. twitter facebook YouTube Podcast Tune in for Apple's 'Let Loose' Event Tomorrow! Surprise! Just a month before
Who wants a new iPad?
Monday, May 6, 2024
Plus: OpenAI and Stack Overflow partner and LockBit's website returns View this email online in your browser By Christine Hall Monday, May 6, 2024 Good afternoon, and welcome back to TechCrunch PM.
🔋 Why You Need More Than One Power Bank — Things We Want to See in Windows 12
Monday, May 6, 2024
Also: 7 Samsung Messages Features You Should Be Using, and More! How-To Geek Logo May 6, 2024 Did You Know You can find all manner of canned vegetables, but not broccoli: the temperatures required for
Launch pad decongestion
Monday, May 6, 2024
We've got some very cool news from Hubble Networks, which became the first company to connect a Bluetooth chip to a satellite. View this email online in your browser By Aria Alamalhodaei Monday,
Daily Coding Problem: Problem #1433 [Medium]
Monday, May 6, 2024
Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Nest. Create a basic sentence checker that takes in a stream of characters and
Want to become an AI consultant?
Monday, May 6, 2024
My take on this new industry
Visualized | Interest Rate Forecasts for Advanced Economies 📈📉
Monday, May 6, 2024
In this graphic, we show the IMF's interest rate forecast for the US, Europe, the UK, and Japan for the next five years ahead. View Online | Subscribe Presented by Voronoi: The App Where Data Tells
⚙️ Apple AI updates
Monday, May 6, 2024
Plus: X AI stories & YouTube "skip to the good part"
Unlock Time Series Data, FTC Chair Joins StrictlyVC & More
Monday, May 6, 2024
TechCrunch Events Roundup | May 6 TechCrunch Events TechCrunch events roundup Unlock the power of time series data with industry experts from AWS and InfluxDB on May 16. Join us next week for this free
Deepdive – product strategy, AI, leadership, emotional intelligence
Monday, May 6, 2024
Earlier this month, we presented our Virtual edition of INDUSTRY: The Product Conference, featuring some of our favorite product leaders worldwide. There were seven great keynote presentations, live