Here are the following relations:
Trips (ID, TripState, TravelMode, Fare)
ByCar(ID, Rental Company, Mileage)
ByTrain (ID, Type, Coach, TrainSpeed, NumberofStops)
ByPlane(ID, Airline, Class, LayoverTime)
Use relational algebra to find the details of the most costly trip (highest fare) (without using specific numbers)
The queries must work arbitrary data, not just the provided data.
Here is some sample data: https://www.dropbox.com/s/4n3z2di7f747u2e/SampleTripData.csv?dl=0
my answer that is probably wrong
My answer in copyable text format:
π (Fare(F1(Trips)) X Fare(F2(Trips)) - σ(ID, F1.Fare >= F2.Fare)(Trips)
My question is, how should I find the maximum cost of the trips (fare) in this case? (I can't use sql, only relational algebra)