Question

9. Google and learn about the SQL function Case...When...End. Use this function to show the number of female, male, and tot

0 0
Add a comment Improve this question Transcribed image text
Answer #1

If you have any doubts, please give me comment...

SELECT

COUNT(case when Gender='F' THEN 1 END) AS Female,

COUNT(CASE WHEN Gender='M' THEN 1 END) AS Male,

COUNT(*) AS Total

FROM Employee;

Add a comment
Know the answer?
Add Answer to:
9. Google and learn about the SQL function "Case...When...End". Use this function to show the number...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 10. Google and learn about the SQL functions Datepart and Datename. Use this function to show...

    10. Google and learn about the SQL functions Datepart and Datename. Use this function to show the number of employees hired by day of the week weekday number of hires 42 1 2 42 2 3 3 31 4 47 5 43 49 6 6 36 7 7 Or weekday number of hires Friday 49 42 Monday 36 Saturday 4 Sunday 42 5 Thursday 43 Tuesday 31 47 7 Wednesday 123 L o 10. Google and learn about the SQL...

  • Objective Learn about String methods Work with the Python documentation Specifics Perform a simple Google search...

    Objective Learn about String methods Work with the Python documentation Specifics Perform a simple Google search (or use any other search engine) on “Python String methods”. One of the first links will be to the Python webpage detailing the built-in data types. This page contains a description of the methods available in String variables. You may use other webpages for this assignment, but you need to be aware of the official documentation for the language. The webpage lists methods that...

  • (Use Excel) According to a report on workforce diversity, about 60% of the employees in high-tech firms in Silicon Valley are white and about 20% are Asian (http://moneycnn.com, November 9, 2011)....

    (Use Excel) According to a report on workforce diversity, about 60% of the employees in high-tech firms in Silicon Valley are white and about 20% are Asian (http://moneycnn.com, November 9, 2011). Women, along with blacks and Hispanics, are highly underrepresented. Just about 30% of all employees are women, with blacks and Hispanics, accounting for only about 15% of the workforce. Tara Jones is a recent college graduate, working for a large high-tech firm in Silicon Valley. She wants to determine...

  • 1. Use the Help function of Excel to learn more about the Excel Scenario Manager and...

    1. Use the Help function of Excel to learn more about the Excel Scenario Manager and the Excel Solver Add-in. 2. Do research on the Web to find business analytics applications that can run on a smartphone. Prepare a brief paragraph summarizing the features and potential applications of three applications of most interest to you.

  • Top of Form Q1 Which of the following is a valid aggregate function in SQL? Check...

    Top of Form Q1 Which of the following is a valid aggregate function in SQL? Check only those that apply. Question 1 options: AVG LEAST COUNT MIN MOST SUM Q2 Which of the following aggregate functions will only operate on a numeric value expression? Check only those that apply: Question 2 options: MIN MAX AVG COUNT SUM Q3 When applying DISTINCT to the value being calculated in an aggregate function like COUNT, what is the effect? SELECT COUNT(DISTINCT StreetName) FROM...

  • Please refer to the following business scenarios: (i) Using SELECT statements of SQL, find the employee...

    Please refer to the following business scenarios: (i) Using SELECT statements of SQL, find the employee id, first name, last name, job title and email of all employees working in Asia (i.e. all countries coming from the region     ‘Asia’). This query must be implemented as a nested query! (ii) Using SELECT statements of SQL, find the employee id, first name, last name, job title and supervisor id of employees who had worked for more than 3 years and completed...

  • What this Lab Is About: Given a UML diagram, learn to design a class Learn how...

    What this Lab Is About: Given a UML diagram, learn to design a class Learn how to define constructor, accessor, mutator and toStringOmethods, etc Learn how to create an object and call an instance method. Coding Guidelines for All ments You will be graded on this Give identifiers semantic meaning and make them easy to read (examples numStudents, grossPay, etc) Keep identifiers to a reasonably short length. Use upper case for constants. Use title case (first letter is u case)...

  • Use what you know about zeros of a function and end behavior of a graph to...

    Use what you know about zeros of a function and end behavior of a graph to choose the graph that matches the function f(x) = (x - 2)x - 1)(x-4). S M M IN

  • Oracle 12c: SQL   Joan Casteel ISBN: 978-1-305-25103-8 Chapter 12 Case Study: City Jail Make sure you...

    Oracle 12c: SQL   Joan Casteel ISBN: 978-1-305-25103-8 Chapter 12 Case Study: City Jail Make sure you have run the CityJail_8.sql script from Chapter 8. This script makes all database objects available for completing this case study. The city's Crime Analysis unit has submitted the following data requests. Provide the SQL statements using subqueries to satisfy the requests. Test the statements and show execution results. Use a sql sub-query statement to answer the following: (Please provide correct answer for questions 6...

  • Note: Use the City Jail database created with the CityJail_8.sql script that you ran for the...

    Note: Use the City Jail database created with the CityJail_8.sql script that you ran for the Chapter 8 case study. The following list reflects the current data requests from city managers. Provide the SQL statements that satisfy the requests. For each request, include one solution using the traditional method and one using an ANSI JOIN statement. Test the statements and show execution results 4. Create an alphabetical list of all criminals, including criminal ID, name, violent offender status, parole status,...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT