answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
evablogger [386]
2 years ago
14

Write a SQL query to find the population of the planet named 'Caprica' -- 10 points Find the first name, last name, and age of p

eople from bsg_people whose last name is not 'Adama' -- 10 points Find the name and population of the planets with a population larger than 2,600,000,000 -- 10 points Find the first name, last name, and age of people from bsg_people whose age is NULL -- 12 points

Computers and Technology
2 answers:
Artemon [7]2 years ago
6 0

The question is incomplete! Complete question along with answer and step by step explanation is provided below.

Please find the attached question.

Answer:

a) SQL Query:

SELECT population

FROM bsg_planets

WHERE name='Caprica';

b) SQL Query:

SELECT fname, lname, age

FROM bsg_people

WHERE lname!='Adama';

c) SQL Query:

SELECT name, population

FROM bsg_planets

WHERE population > 2600000000

d) SQL Query:

SELECT fname, lname, age

FROM bsg_people

WHERE age IS NULL;

Explanation:

a) Write a SQL query to find the population of the planet named 'Caprica'

Syntax:

SELECT  Column

FROM TableName

WHERE Condition;

For the given case,

Column = population

TableName  = bsg_planets

Condition = name='Caprica'

SQL Query:

SELECT population

FROM bsg_planets

WHERE name='Caprica';

Therefore, the above SQL query finds the population of the planet named 'Caprica' from the table bsg_planets.

b) Find the first name, last name, and age of people from bsg_people whose last name is not 'Adama'

Syntax:

SELECT  Column1, Column2, Column3

FROM TableName

WHERE Condition;

For the given case,

Column1 = fname

Column2 = lname

Column3 = age

TableName  = bsg_people

Condition = lname!='Adama'

SQL Query:

SELECT fname, lname, age

FROM bsg_people

WHERE lname!='Adama';

Therefore, the above SQL query finds the first name, last name and age of people whose last name is not 'Adama' from the table bsg_people.

c) Find the name and population of the planets with a population larger than 2,600,000,000

Syntax:

SELECT  Column1, Column2

FROM TableName

WHERE Condition;

For the given case,

Column1 = name

Column2 = population

TableName  = bsg_planets

Condition = population > 2600000000

SQL Query:

SELECT name, population

FROM bsg_planets

WHERE population > 2600000000

Therefore, the above SQL query finds the name and population of the planets with a population larger than 2,600,000,000 from the table bsg_planets.

d) Find the first name, last name, and age of people from bsg_people whose age is NULL

Syntax:

SELECT  Column1, Column2, Column3

FROM TableName

WHERE Condition;

For the given case,

Column1 = fname

Column2 = lname

Column3 = age

TableName  = bsg_people

Condition = age IS NULL

SQL Query:

SELECT fname, lname, age

FROM bsg_people

WHERE age IS NULL;

Therefore, the above SQL query finds the first name, last name and age of people whose age is NULL from the table bsg_people.

Delicious77 [7]2 years ago
6 0

Answer:

SQL Query : select population from bsg_planets where name='Caprica';

SQL Query : select fname,lname,age from bsg_people where lname!='Adama';

SQL Query : select name,population from bsg_planets where population > 2600000000;

SQL Query : select fname,lname,age from bsg_people where age='NULL';

Explanation:

using MySQL Workbench.

SQL Query : select population from bsg_planets where name='Caprica';

Because this sql query will return the population from bsg_planets where the name is Caprica;

SQL Query : select fname,lname,age from bsg_people where lname!='Adama';

Because this SQL query will return the first name ,last name and age from the bsg_people where last name is not adama.

SQL Query : select name,population from bsg_planets where population > 2600000000;

Because this SQL query will return the name and population where population is greater than 2600000000

SQL Query : select fname,lname,age from bsg_people where age='NULL';

Because this SQL query will return the first name ,last name and age from the bsg_people where age is NULL.

You might be interested in
Use Excel to develop a regression model for the Consumer Food Database (using the "Excel Databases.xls" file on Blackboard) to p
m_a_m_a [10]

Answer:

Step 1 : Create an Indicator Variable for metro cities using formula mentioned in formula bar.

Step 2: Filter the Data on Metro cities i.e. select only those cities with Metro Indicator 1.

Step 3: Paste this filtered data to a new sheet.

Step 4: Go to Data - Data Analysis - Regression

Step 5: Enter the range of Y-variable and X-variable as shown. Select Output range and click on residuals. It will give you Output Summary and the Predicted Values along with Residuals

Please see attachment

5 0
2 years ago
George is working with an image in Photoshop. He added a lot of effects to the image. He saved the first draft of the file. The
Alja [10]

Answer:

JPEG, PDF

Explanation:

3 0
1 year ago
Read 2 more answers
Which feature of a typical professional networking site helps users add professional details to their profile ?
ludmilkaskok [199]
All I  could find are networking cites allow people to take pics of themselves for a personal effect! hope this is what your looking for.
7 0
1 year ago
Read 2 more answers
A user called to inform you that the laptop she purchased yesterday is malfunctioning and will not connect to her wireless netwo
kakasveta [241]

Answer:

You can perform the following two steps

Explanation:

  1. Have the user press the appropriate function key combination to enable the wireless radio and then attempt to connect to the wireless network (since by mistake he could have disabled it).
  2. Ask the user to turn on the laptop’s airplane mode and attempt to reconnect to the wireless network (this mode basically what it does is disable adapters and activate it will connect the Wi-Fi network).
7 0
1 year ago
You can apply several different worksheet themes from which tab?
Lemur [1.5K]
<span>D. Page Layout  i hope this helps </span>
8 0
1 year ago
Read 2 more answers
Other questions:
  • The term load is often used to describe opening a page in a ____. Answer
    11·1 answer
  • Linda is making handouts for her upcoming presentation. She wants the handouts to be comprehensible to people who do not attend
    12·2 answers
  • Which of these words could byte pair encoding compress the most?
    13·1 answer
  • Delete Prussia from country_capital. Sample output with input: 'Spain:Madrid,Togo:Lome,Prussia: Konigsberg' Prussia deleted? Yes
    13·1 answer
  • Write a class with a constructor that accepts a String object as its argument. The class should have a method that returns the n
    13·1 answer
  • 6.4 Predicting Prices of Used Cars. The file ToyotaCorolla.csv contains data on used cars (Toyota Corolla) on sale during late s
    5·1 answer
  • Jen is trying to discover if a motor has failed windings. What sort of test can she do.
    6·1 answer
  • What is the average number of nodes accessed in search for a particular element in an unordered list? In an ordered list? In an
    6·1 answer
  • Which is true regarding pseudocode
    8·1 answer
  • a. a large central network that connects other networks in a distance spanning exactly 5 miles. b. a group of personal computers
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!