How do I make function call in VIEW in order to calculate the difference between two time variables What I have right now is
CREATE TABLE Recordings
(
recording_id INTEGER PRIMARY KEY,
start_time TIME,
end_time TIME
)
CREATE VIEW duration(start_time, end_time)
AS SELECT R.start_time, R.end_time
#Function call to calculate time
FROM Recordings R;
I looked up SQL documentation, it only has date_part which calculates the date difference, how do I calculate TIME?