Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

following picture is the sample formula for given related questionnis it means we have to use Joining query formula to conect two three or more

image text in transcribed
image text in transcribed
image text in transcribed
following picture is the sample formula for given related questionnis it means we have to use Joining query formula to conect two three or more tables together and then run the query for answer, we have the table data and the question need to conect them to find the answer image text in transcribed
image text in transcribed
1.1 Build a detailed list of crimes against Property reported to have occurred in district *** at locations with a description of CTA BUS STOP Show the case number. IUCR primary description, IUCR secondary description, community area number and beat. Order the result by secondary description then primary description then by case number, Note: Only include crimes where the crime against column equals -Property . 1.2 Build a community-area crime report showing each incident of public peace violation a. Include crimes reported in Chicago's side named -North Side with a primary description of "PUBLIC PEACE VIOLATION b. Show the community area name, secondary description, arrest, report number, beat, and Sort the results by community area name then by arrest then by secondary description then by report number block columns c List the crimes reported to have occurred at exactly 10:00 am on July 1, 2016. a show the title from the FBI code table, ward number, district number, report number, b. Sort the results by district number then by ward number then by title then by report number 1.4 Suppose you work for alderman Carlos Ramirez-Rosa in the office of ward #3s. The alderman would like to discuss progress on the cases of a particular category of crime with commanders of the districts where the crimes occurred. Generate a list to facilitate this discussion a List all crimes reported in ward was with an IUCR primary description of -WEAPONS b. Show the primary_description secondary_description, district number, arrest Sort the results by district number then by secondary description then by arrest then by case number c 10 Suppose you live in the New City neighborhood and are concerned about the rise in a particular category of crime. You have a meeting scheduled with a member of your alderman's staff to discuss the issue. To prepare for the meeting you need to prepare a list of the crimes. a. List all crimes reported in the community area associated with your neighborhood (New City) with an IUCR primary description of "INTERFERENCE WITH PUBLIC OFFICER- b. Show the primary_description secondary description, arrest, report number, date, location description, and block. Sort the results by arrest then by secondary description then by report number e atlas-query/crime-chicago-2018 O O community area o community_area_no o community area_name side o population crime o report_no case_number o date o block o iucr_no location_description arrest o domestic beat o district_no o ward_no o community_area_no ofbi_code_no o latitude o longitude o location district o district_no district_name o address o zip_code commander email o phone fax tty twitter fbi_code ofbi_code_no I . O 0 0 0 0 . title description o crime against lucr lucr_no primary_description Secondary description index_code o O O neighborhood o neighborhood name o community_area_no ward ward_no alderman_first_name alderman_last_name alderman_name_suffix ward_office_address ward_office_zip ward_email ward_office_phone o ward_office_fax city_hall_office_room city_hall_office_phone city_hall_office_fax population O O O O o o The query results for this SQL statement are on Figure 14.7. Notice that the first name field is on the member table, the major_name is on the major table, and the state field is on the zip code table. We can seamlessly use all three of these fields in the same query once the three tables are joined together. 1 2 3 SELECT first_name, major_name, state FROM major JOIN member ON major.major_id = member.link_to_major JOIN zip code ON member.zip - zip_code.zip_code 4 5 6 Run query E Results table Next W A tv 00 0 your result Second example Make a list that shows which members have submitted expenses for each budget category. Show the budget categories and the members' first and last name. Sort the results by budget category then by member last name. Be sure to remove any duplicates from your result. Salution: SELECT DISTINCT budget.category, first_name, last_name FROM budget JOIN expense ON budget_id= expense.link_to_budget JOIN member ON member_id=expense.link_to_member ORDER by category, last_name FEB tv Sm 10 GO

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Online Market Research Cost Effective Searching Of The Internet And Online Databases

Authors: John F. Lescher

1st Edition

0201489295, 978-0201489293

More Books

Students also viewed these Databases questions