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
Answer:
false
Explanation:
the brain is only really fully devolved by age 26
Answer:
Explanation:if you stretch the hose more tightly the speed of the pulse will reduce..
Answer:
Program that removes all spaces from the given input
Explanation:
// An efficient Java program to remove all spaces
// from a string
class GFG
{
// Function to remove all spaces
// from a given string
static int removeSpaces(char []str)
{
// To keep track of non-space character count
int count = 0;
// Traverse the given string.
// If current character
// is not space, then place
// it at index 'count++'
for (int i = 0; i<str.length; i++)
if (str[i] != ' ')
str[count++] = str[i]; // here count is
// incremented
return count;
}
// Driver code
public static void main(String[] args)
{
char str[] = "g eeks for ge eeks ".toCharArray();
int i = removeSpaces(str);
System.out.println(String.valueOf(str).subSequence(0, i));
}
}