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
Blizzard [7]
2 years ago
12

The given SQL creates a Movie table with an auto-incrementing ID column. Write a single INSERT statement immediately after the C

REATE TABLE statement that inserts the following movies:
Title Rating Release Date
Raiders of the Lost Ark PG June 15, 1981
The Godfather R March 24, 1972
The Pursuit of Happyness PG-13 December 15, 2006
Note that dates above need to be converted into YYYY-MM-DD format in the INSERT statement. Run your solution and verify the movies in the result table have the auto-assigned IDs 1, 2, and 3.
CREATE TABLE Movie (
ID INT AUTO_INCREMENT,
Title VARCHAR(100),
Rating CHAR(5) CHECK (Rating IN ('G', 'PG', 'PG-13', 'R')),
ReleaseDate DATE,
PRIMARY KEY (ID)
);
-- Write your INSERT statement here:
Computers and Technology
1 answer:
Snowcat [4.5K]2 years ago
3 0

Answer:

INSERT INTO Movie(Title,Rating,ReleaseDate)

VALUES("Raiders of the Lost ArkPG",'PG',DATE '1981-06-15'),

("The Godfaher",'R',DATE '1972-03-24'),

("The Pursuit of Happyness",'PG-13',DATE '2006-12-15');

Explanation:

The SQL statement uses the "INSERT" clause to added data to the movie table. It uses the single insert statement to add multiple movies by separating the movies in a comma and their details in parenthesis.

You might be interested in
Write a split check function that returns the amount that each diner must pay to cover the cost of the meal The function has 4 p
Trava [24]

Answer:

def split_check(bill, people, tax_percentage = 0.09, tip_percentage = 0.15):

   tip = bill * tip_percentage

   tax = bill * tax_percentage

   total = bill + tip + tax

   

   return total / people

bill = float(input())

people = int(input())

print("Cost per diner: " + str(split_check(bill, people)))

bill = float(input())

people = int(input())

new_tax_percentage = float(input())

new_tip_percentage = float(input())

print("Cost per diner: " + str(split_check(bill, people, new_tax_percentage, new_tip_percentage)))

Explanation:

Create a function called split_check that takes four parameters, bill, people, tax_percentage and tip_percentage (last two parameters are optional)

Inside the function, calculate the tip and tax using the percentages. Calculate the total by adding bill, tip and tax. Then, return the result of total divided by the number of people, corresponds to the cost per person.

For the first call of the function, get the bill and people from the user and use the default parameters for the tip_percentage and tax_percentage. Print the result.

For the second call of the function, get the bill, people, new_tip_percentage and new_tax_percentage from the user. Print the result.

7 0
2 years ago
Write multiple if statements. If car_year is 1969 or earlier, print "Few safety features." If 1970 or later, print "Probably has
Kazeer [188]

Answer:

<em>import java.util.Scanner;</em>

<em>public class Hggg {</em>

<em>        public static void main (String [] args) {</em>

<em>            System.out.println("Enter the car make year");</em>

<em>            Scanner in = new Scanner(System.in);</em>

<em>            int car_year = in.nextInt();</em>

<em>            if (car_year<1969){</em>

<em>             System.out.println("Few safety features.");</em>

<em>            }</em>

<em>            else if (car_year>=1970 && car_year<1990){</em>

<em>                System.out.println("Probably has seat belts.");</em>

<em>            }</em>

<em>            else if (car_year>=1990 && car_year<2000){</em>

<em>                System.out.println("Probably has seat belts.");</em>

<em>                System.out.println("Probably has antilock brakes.");</em>

<em>            }</em>

<em>            else if (car_year>=2000){</em>

<em>                System.out.println("Probably has seat belts.");</em>

<em>                System.out.println("Probably has antilock brakes.");</em>

<em>                System.out.println("Probably has airbags.");</em>

<em>            }</em>

<em>        }</em>

<em>    }</em>

Explanation:

In this solution, multiple if statements have been used to accomplish each step. Observe that there are more than one print statements when year is greater than 1990 because the condition applied to year greater than 1970 holds true for every year greater than 1970 (1990, 2000 etc)

3 0
2 years ago
Which are factors that go into a project plan? Choose four answers.
USPshnik [31]

Factors that go into a project plan

  • Estimate the scope of work, based on similar projects.
  • Make sure everyone takes responsibility.
  • Creating and defining team goal
  • Working to a budget

Explanation:

Project Estimating  : Every project is different, but that doesn’t mean you have to start from zero each time. The best way to make sure you’re on the right track is to approach it from every angle. Consider similar projects, talk to your team, and understand what the client is expecting and how they’d like things to go.

Managing your team size  : A smaller team is usually preferable as it puts your project in the most ideal position to be completed on time and at the quality you expect, without burning out your team members. A smaller team also reduces the number of communication channels, which means there’s less opportunity for misinterpretation or people simply missing something.  

Planning and managing your team resources  : That said, there may be a time when you don’t have the right resources in-house to do the job. Either they are fully allocated to another project or no one has the right skill set. In this situation you have two options, either bring in freelance contractors or hire a new employee to fill the role.  

Creating and defining team goals  : The planning phase is when you’ll want to work with the team to understand what their individual goals are for the project. Is there something different they’d like to try? A test or new idea they’d like the chance to prove? Or perhaps a roadblock they want to avoid?

Scheduling Tasks to a Project Timeline  : The timeline of the project will largely be determined by the client, as they often have deadlines they need to hit to meet certain business goals that are simply out of your control. However, setting clear expectations and agreeing on the timing of key deliverables is crucial.

7 0
2 years ago
"In Windows, what two terms describe the active partition on an MBR drive, and the location where the Windows operating system i
Oxana [17]

Answer:

Boot partition and system partition

Explanation:

System partition is the primary partition that is used as the active boot partition,it saves boot files and all files that will be used.  System partition is also known as the system directory or root directory and is usually given the identifier "c"

Boot partition is the disk partition that holds the files for the operating system files Windows operating system (either XP, Vista, 7, 8, 8.1 or 10), it works with the system partition and tells the computer where to look when starting. It given the identifier of letter "D" or "E"

5 0
2 years ago
Read 2 more answers
Define a structure type auto_t to represent an automobile. Include components for the make and model (strings), the odometer rea
yulyashka [42]

Answer:

see explaination

Explanation:

#include <stdio.h>

#include <string.h>

#define BUFSIZE 1000

struct auto_t scan_auto(char *);

struct date_t {

char day[2];

char month[2];

char year[4];

};

struct tank_t {

char tankCapacity[10];

char currentFuelLevel[10];

};

struct auto_t {

char make[50];

char model[50];

char odometerReading[10];

struct date_t manufactureDate;

struct date_t purchaseDate;

struct tank_t gasTank;

};

int main(int argc, char *argv[]) {

/* the first command-line parameter is in argv[1]

(arg[0] is the name of the program) */

FILE *fp = fopen(argv[1], "r"); /* "r" = open for reading */

char buff[BUFSIZE]; /* a buffer to hold what you read in */

struct auto_t newAuto;

/* read in one line, up to BUFSIZE-1 in length */

while(fgets(buff, BUFSIZE - 1, fp) != NULL)

{

/* buff has one line of the file, do with it what you will... */

newAuto = scan_auto(buff);

printf("%s\n", newAuto.make);

}

fclose(fp); /* close the file */

}

struct auto_t scan_auto(char *line) {

int spacesCount = 0;

int i, endOfMake, endOfModel, endOfOdometer;

for (i = 0; i < sizeof(line); i++) {

if (line[i] == ' ') {

spacesCount++;

if (spacesCount == 1) {

endOfMake = i;

}

else if (spacesCount == 2) {

endOfModel = i;

}

else if (spacesCount == 3) {

endOfOdometer = i;

}

}

}

struct auto_t newAuto;

int count = 0;

for (i = 0; i < endOfMake; i++) {

newAuto.make[count++] = line[i];

}

newAuto.make[count] = '\0';

count = 0;

for (i = endOfMake+1; i < endOfModel; i++) {

newAuto.model[count++] = line[i];

}

newAuto.model[count] = '\0';

count = 0;

for (i = endOfModel+1; i < endOfOdometer; i++) {

newAuto.odometerReading[count++] = line[i];

}

newAuto.odometerReading[count] = '\0';

return newAuto;

}

8 0
2 years ago
Other questions:
  • Mr. Cooper would like to customize his Excel software so his students can create an electronic graph in Excel for their lab repo
    6·1 answer
  • Days of the week are represented as three-letter strings ("Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"). Write a javaScript f
    14·1 answer
  • Tina reported a safety hazard at her workplace to OSHA. Representatives from OSHA
    5·1 answer
  • Database management systems are expected to handle binary relationships but not unary and ternary relationships.'
    7·1 answer
  • PC’s &amp; More has shifted to sales and service of laptops and PCs, where it has the potential to triple the number of its cust
    14·1 answer
  • Create the strAnalysis() function that takes 1 string argument and returns a string message. The message will be an analysis of
    15·1 answer
  • Write a function in the cell below that iterates through the words in file_contents, removes punctuation, and counts the frequen
    6·1 answer
  • Do Exercise 6.4 from your textbook using recursion and the is_divisible function from Section 6.4. Your program may assume that
    6·1 answer
  • _____________ data is what is translated to digital format so it can be stored in a computer.
    10·1 answer
  • A retailer is able to track which products draw the most attention from its customers through the use of 5g-enabled motion senso
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!