Answer:
SELECT inventory_id, film_id, title, store_id, address_id
FROM Inventory.Inventory
JOIN Business.store ON Inventory.store_id = store.store_id
JOIN Business.rental ON rental.film_id = Inventory.film_id
JOIN film_text ON Inventory.film_id = film_text.film_id
WHERE COUNT(rental_id) = 0;
Explanation:
The JOIN clause is also used to query tables from two databases. The Inventory and the Business database are joined in the inventory and store table respectively. The Query also joins the inventory table and the film_text table to get the title or name of the film rented where the rental_id count is equal to zero.
Answer:
int counter = 0;
String userInput = "";
while (userInput != "stop") {
print "What pet do you have? ";
userInput = readInputLine();
if (userInput != "stop" ){
counter = counter + 1;
print "\nYou have one ";
print userInput;
print ". Total # of Pets: ";
print counter;
}
}
Explanation:
not sure what programming language you use, therefore the answer is pseudocode but it should give you an idea how to implement a piece of code for this problem.
Also, from the way you described the exercise I'm not sure if you always are supposed to reply with "you have one" + the pet or if you should count how often the same pet was entered.
Answer:
Written using C++
/*Enter Your Details Here*/
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
//1
float side;
cout<<"Enter the side of a square: ";
//2
cin>>side;
//3
float perimeter = 4 * side;
cout<<"The perimeter is "<<perimeter<<endl;
//4
float area = side *side;
cout<<"The area is "<<area<<endl;
//5
float diagonal = sqrt(2 * side * side);
cout<<"The length of the diagonal is "<<diagonal;
return 0;
}
Explanation:
<em>I've added the full source code as an attachment where I used more comments to </em><em>explain </em><em>difficult line</em>