University acceptance rates by college and program

InterviewQs

University acceptance rates by college and program

SQL Database Querying Aggregation Functions

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

Hi, 

Suppose you're given the tables below showing information for various college programs, as well as student applications for those programs. Note that 'college_name_program_id' is a unique identifier for the college/program combination, and 1 indicates a student was accepted in the 'accepted' field in the 'student_apps' table.

Table: college_info

college_name_program_id college_name college_program
00001 University A Engineering
00002 University A Business
00003 University A Mathematics
00004 University B Engineering
00005 University B Business
00006 University B Mathematics
00007 University C Engineering
00008 University C Business
00009 University C Mathematics

Table: student_apps

student_id college_name_program_id accepted
31331 00001 0
34583 00001 1
23455 00002 0
23454 00005 1
22337 00007 1
00112 00009 0
12332 00004 1
99123 00003 1
87903 00002 0
23547 00002 1
66543 00003 0
34554 00001 1

Using the tables above, write a SQL query to return the total number of students accepted as well as the acceptance rate (number accepted over number applied) by each college as well as the total number accepted by each program (agnostic of the college the program is under).

You can view/query this table in an interactive SQL fiddle here.



 

You’ve accumulated 329 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

Correlation between IMBD and Rotten Tomatoes ratings

Friday, August 5, 2022

Python, Data structures, Correlation Analysis, InterviewQs Correlation between IMBD and Rotten Tomatoes ratings Python Data structures Correlation Analysis Forward this email to a friend or colleague

Package colors

Wednesday, August 3, 2022

Python, Algorithms, Data Structures, Arrays, InterviewQs Package colors Python Algorithms Data Structures Arrays Forward this email to a friend or colleague and challenge them to solve it. Hi, Suppose

Assigned flight seating

Monday, August 1, 2022

Probability Theory, Probability Reasoning, InterviewQs Assigned flight seating Probability Theory Probability Reasoning Forward this email to a friend or colleague and challenge them to solve it. Hi,

Cumulative cash flows

Friday, July 29, 2022

SQL, Database Querying, Window Function, Cumulative Sum, InterviewQs Cumulative cash flows SQL Database Querying Window Function Cumulative Sum Forward this email to a friend or colleague and challenge

Modeling an epidemic

Wednesday, July 27, 2022

Python, Differential equations, Modeling, Stochastic Processes, InterviewQs Modeling an epidemic Python Differential equations Modeling Stochastic Processes Forward this email to a friend or colleague

You Might Also Like

📧 Introduction to Distributed Tracing With OpenTelemetry in .NET

Saturday, April 20, 2024

​ Introduction to Distributed Tracing With OpenTelemetry in .NET Read on: m​y website / Read time: 5 minutes BROUGHT TO YOU BY ​ Shesha: The .NET Open-Source Low-Code Framework ​ Introducing Shesha, a

a16z’s Infrastructure team gets a new general partner

Friday, April 19, 2024

Post News is shutting down and Wall Street isn't feeling a Salesforce-Informatica pairing View this email online in your browser By Christine Hall Friday, April 19, 2024 Image Credits: Andreessen

New Roundtable! Additive for Mass Production Applications

Friday, April 19, 2024

The Outlook for the Future View this email in your browser engineering.com Roundtable - Additive for Mass Production Applications: The Outlook for the Future 6 Considerations for Choosing the Right

📷 What to Know About Macro Photography — Why You Should Buy a Budget Motherboard

Friday, April 19, 2024

Also: How to Automatically Highlight Values in Excel, and More! How-To Geek Logo April 19, 2024 📩 Get expert reviews, the hottest deals, how-to's, breaking news, and more delivered directly to your

Is the wind going out of the AI sails?

Friday, April 19, 2024

Rippling vacuums up venture capital and Ramp bags more millions View this email online in your browser By Haje Jan Kamps Friday, April 19, 2024 Image Credits: Getty Images / Carol Yepes Welcome to

Llama 3 is out - Weekly News Roundup - Issue #463

Friday, April 19, 2024

Plus: brand-new, all-electric Atlas; AI Index Report 2024; Microsoft pitched GenAI tools to US military; Humane AI Pin reviews are in; debunking Devin; and more! ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

Daily Coding Problem: Problem #1417 [Easy]

Friday, April 19, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Wayfair. You are given a 2 x N board, and instructed to completely cover the board with

Charted | How Hard Is It to Get Into an Ivy League School? 🎓

Friday, April 19, 2024

We detail the admission rates and average annual cost for Ivy League schools, as well as the median SAT scores required to be accepted. View Online | Subscribe Presented by: Discover the motivations

Dark Matter & Tortured Poets

Friday, April 19, 2024

New music releases aren't what they used to be -- for good and bad. Dark Matter & Tortured Poets By MG Siegler • 19 Apr 2024 View in browser View in browser New music releases in 2024 are a

Impact of AI on Product Management

Friday, April 19, 2024

​ Impact of AI on Product Management The rise of the AI Product Manager. Product managers have always championed customer's needs. However, with AI, the job requires new technical and ethical