Answer the given question with a proper explanation and step-by-step solution. My SQL Project Part 1- Data Impressions   What cities have active members? Are there any cities listed in the city table with no active members? If so, what state are those cities in? How many groups are currently open, waiting for approval, and/or closed?

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Answer the given question with a proper explanation and step-by-step solution.

My SQL

Project Part 1- Data Impressions

 

  1. What cities have active members?
  2. Are there any cities listed in the city table with no active members? If so, what state are those cities in?
  3. How many groups are currently open, waiting for approval, and/or closed?
  4. What are the five categories that contain the most groups? What are the five categories that contain the least number of groups?
  5. What percentage of members are in Chicago?
  6. How many members are there?

Example How many members are there?

SELECT sum(`city`.`member_count`)

FROM `city`;

grp_member
member_id INT(11)
✓dity VARCHAR(45)
country CHAR(2)
> hometown VARCHAR(45)
joined DATETIME
member_name VARCHAR(45)
member status ENUM(...)
visited DATETIME
group_id INT(11)
Indexes
city
city_id INT(11)
dity VARCHAR(45)
>+1
> distance DECIMAL(12,3)
longitude DECIMAL(12,8)
> latitude DECIMAL(12,8)
member_count INT(11)
→ ranking INT(11)
Indexes
1
→state CHAR(2)
zip INT(11)
✓ country CHAR(2)
localized_country_name VARCHAR (45) +
+
category
category_id INT(11)
category_name VARCHAR(45)
LetsMeet ERD
→shortname VARCHAR(45)
sort_name VARCHAR(45)
Indexes
# 4€
grp
group_id INT(11)
category_id INT(11)
dity_id INT(11)
+ created DATETIME
description LONGTEXT
join_mode ENUM(...)
group_name VARCHAR(150)
Indexes
rating DECIMAL(4,2)
visibility ENUM(...)
members INT(11)
who VARCHAR(85)
H+
venue_
venue_id INT(11)
address_1 VARCHAR(200)
address_2 VARCHAR(200)
dity VARCHAR(45)
country CHAR(2)
✓distance DECIMAL(10,2)
→lat DECIMAL(10,8)
localized_country_name VARCHAR(45)
→lon DECIMAL(12,8)
✓venue_name VARCHAR(300)
> phone BIGINT(20)
state CHAR(2)
→ zip INT(11)
→ RAND() DOUBLE
Indexes
Hh
44
event
event_id VARCHAR(75)
created DATETIME
description LONGTEXT
duration INT(11)
event_url VARCHAR(250)
group_id INT(11)
>headcount INT(11)
how_to_find_us VARCHAR(250)
maybe_rsvp_count INT(11)
→ event_name VARCHAR (95)
photo_url VARCHAR(250)
→ rsvp_limit INT(11)
→ event_status ENUM(...)
event time DATETIME
--> updated DATETIME
utc_offset INT(11)
→venue_id INT(11)
visibility ENUM(...)
waitlist_count INT(11)
why VARCHAR(45)
→yes_rsvp_count INT(11)
Indexes
Transcribed Image Text:grp_member member_id INT(11) ✓dity VARCHAR(45) country CHAR(2) > hometown VARCHAR(45) joined DATETIME member_name VARCHAR(45) member status ENUM(...) visited DATETIME group_id INT(11) Indexes city city_id INT(11) dity VARCHAR(45) >+1 > distance DECIMAL(12,3) longitude DECIMAL(12,8) > latitude DECIMAL(12,8) member_count INT(11) → ranking INT(11) Indexes 1 →state CHAR(2) zip INT(11) ✓ country CHAR(2) localized_country_name VARCHAR (45) + + category category_id INT(11) category_name VARCHAR(45) LetsMeet ERD →shortname VARCHAR(45) sort_name VARCHAR(45) Indexes # 4€ grp group_id INT(11) category_id INT(11) dity_id INT(11) + created DATETIME description LONGTEXT join_mode ENUM(...) group_name VARCHAR(150) Indexes rating DECIMAL(4,2) visibility ENUM(...) members INT(11) who VARCHAR(85) H+ venue_ venue_id INT(11) address_1 VARCHAR(200) address_2 VARCHAR(200) dity VARCHAR(45) country CHAR(2) ✓distance DECIMAL(10,2) →lat DECIMAL(10,8) localized_country_name VARCHAR(45) →lon DECIMAL(12,8) ✓venue_name VARCHAR(300) > phone BIGINT(20) state CHAR(2) → zip INT(11) → RAND() DOUBLE Indexes Hh 44 event event_id VARCHAR(75) created DATETIME description LONGTEXT duration INT(11) event_url VARCHAR(250) group_id INT(11) >headcount INT(11) how_to_find_us VARCHAR(250) maybe_rsvp_count INT(11) → event_name VARCHAR (95) photo_url VARCHAR(250) → rsvp_limit INT(11) → event_status ENUM(...) event time DATETIME --> updated DATETIME utc_offset INT(11) →venue_id INT(11) visibility ENUM(...) waitlist_count INT(11) why VARCHAR(45) →yes_rsvp_count INT(11) Indexes
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps

Blurred answer
Knowledge Booster
Single Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education