1answer.
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
dusya [7]
3 years ago
9

Colonial Adventure Tours calculates the total price of a trip by adding the trip price plus other fees and multiplying the resul

t by the number of persons included in the reservation. List the reservation ID, trip name, customer’s last name, and total cost for all reservations where the number of persons is greater than four. Use the column name TotalCost for the calculated field.
Engineering
1 answer:
Vilka [71]3 years ago
3 0

Answer:

The following query is used to display TripName. Reservationld, FirstName. LastName and TotalCost of trip by adding the trip price plus other fees and multiplying the result by the number of persons which have number of persons >4.

Query:

SELECT ReservationlD, Trip.TripName. Customer.LastName. Customer.FirstName. (TripPrice+OtherFees) 'NumPersons as TotalCost FROM Reservation, Trip, Customer WHERE NumPersons>4 AND Reservation.TriplD=Trip.TriplD AND

Customer. CustomerNum=Reservation.CustomerNum:

Explanation:

  • Select clause is used to retrieve data from specified database table or relation and returns the data in the form of table.
  • ReservationID. Trip.TripName. Customer.LastName. Customer.FirstName are the column name of table.
  • (TripPrice+OtherFees) 'NumPersons will calculate the total cost of the Trip and stored it into TotalCost column.
  • As clause is used to give new name TotalCost to resultant column.
  • FROM clause specifies one or more table from where records to be retrieved. o Reservation. Trip and Customer are the table name.
  • WHERE clause is used in SQL query to retrieve only those records that satisfy the specified condition

You might be interested in
When CO2 rises, temperature rises. Why do you think this is?
icang [17]

Answer:

The warming causes the oceans to release CO2. The CO2 amplifies the warming and mixes through the atmosphere, spreading warming throughout the planet. So CO2 causes warming AND rising temperature causes CO2 rise. Overall, about 90% of the global warming occurs after the CO2 increase.

Explanation:

6 0
2 years ago
What is the braks mean effictive pressure?
OverLord2011 [107]

Engine cylinder pressure

<u>Explanation:</u>

  1. Brake mean effective pressure is a method to calculate  the engine cylinder pressure which  would give the measured brake horsepower. Brake mean effective pressure is used to identify engine efficiency regardless of capacity or engine speed.
  2. It is used to identify engine efficiency.It is measured by means of transducers or pressure gauges.
  3. It is the measure of engine capacity to do work.

7 0
3 years ago
You will create an array manipulation program that allows the user to do pretty much whatever they want to an array. When launch
enyata [817]

Answer:

Check the explanation

Explanation:

#include <iostream>

using namespace std;

void insert(int* arr, int* size, int value, int position){

if(position<0 || position>=*size){

cout<<"position is greater than size of the array"<<endl;

return ;

}

*size = *size + 1 ;

for(int i=*size;i>position;i--){

arr[i] = arr[i-1];

}

arr[position] = value ;

}

void print(int arr[], int size){

for(int i=0;i<size;i++){

cout<< arr[i] <<" ";

}

cout<<" "<<endl;

}

void remove(int* arr, int* size, int position){

* size = * size - 1 ;

for(int i=position;i<*size;i++){

arr[i] = arr[i+1];

}

}

int count(int arr[], int size, int target){

int total = 0 ;

for(int i=0;i<size;i++){

if(arr[i] == target)

total += 1 ;

}

return total ;

}

int main()

{

int size;

cout<<"Enter the initial size of the array:";

cin>>size;

int arr[size],val;

cout<<"Enter the values to fill the array:"<<endl;

for(int i=0;i<size;i++){

cin>>val;

arr[i] = val ;

}

int choice = 5,value,position,target ;

do{

cout<<"Make a selection:"<<endl;

cout<<"1) Insert"<<endl;

cout<<"2) Remove"<<endl;

cout<<"3) Count"<<endl;

cout<<"4) Print"<<endl;

cout<<"5) Exit"<<endl;

cout<<"Choice:";

cin>>choice;

switch(choice){

case 1:

cout << "Enter the value:";

cin>>value;

cout << "Enter the position:";

cin>>position;

insert(arr,&size,value,position);

break;

case 2:

cout << "Enter the position:";

cin>>position;

remove(arr,&size,position);

break;

case 3:

cout<<"Enter the target value:";

cin>>target;

cout <<"The number of times "<<target<<" occured in your array is:" <<count(arr,size,target)<<endl;

break;

case 4:

print(arr,size);

break;

case 5:

cout <<"Thank you..."<<endl;

break;

default:

cout << "Invalid choice..."<<endl;

}

}while(choice!=5);

return 0;

}

Kindly check the attached images below for the code output.

3 0
3 years ago
A stress of 2500 psi is applied to a polymer serving as a fastener in a complex assembly. At a constant strain, the stress drops
sesenic [268]
Very very hard to answer
6 0
2 years ago
A 20 kg mass is thrown from the ground to a height of 50 m. (a) find the kinetic energy of the mass at this height. (b) find the
horrorfan [7]

Answer:

(a) 0 kJ

(b) 9.81 kJ

(c) 31.32 m/s

Explanation:

(a)

From the law of conservation of energy, energy can only be transformed from one state to another. At a height of 50 m, all the kinetic energy is converted to potential energy hence KE=0

(b)

Potential energy, PE=mgh where m is the mass, g is acceleration due to gravity and h is the height

Substituting 50 m for h and 20 Kg for m, taking g as 9.81 then

PE=20*9.81*50=9810 J=9.81 kJ

(c)

Relating the equation of potential energy to the equation of kinetic energy, which is 0.5mv^{2}

mgh=0.5mv^{2} where v is the velocity of the mass

v=\sqrt {2gh}

Substituting 50 m for h and taking g as 9.81 then

v=\sqrt {2*9.81*50}=31.32091953\approx 31.32 m/s

3 0
3 years ago
Other questions:
  • According to the amortization table, Demarco and Tanya will pay a total of in interest over the life of their loan.
    6·2 answers
  • The screw of shaft straightener exerts a load of 30 as shown in Figure . The screw is square threaded of outside diameter 75 mm
    5·1 answer
  • A gas turbine operates with a regenerator and two stages of reheating and intercooling. Air enters this engine at 14 psia and 60
    11·1 answer
  • Independent auto lots usually have ____ finance rates than dealerships
    7·1 answer
  • Write a statement that increases numPeople by 5. Ex: If numPeople is initially 10, the output is: There are 15 people.
    11·1 answer
  • When should u check ur review mirror
    5·1 answer
  • 1. What's the maximum overall length of the part?<br> 2. What material is used to fabricate the part
    5·1 answer
  • What car has autopilot?
    14·2 answers
  • Construction lines are thick lines true false
    11·2 answers
  • Hello how are you all bye everyone have a great day ahead​
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!