Files
2016-11-02 14:23:38 -07:00

30 lines
765 B
Transact-SQL

-- Join Date table and Trip table
SELECT TOP (1000000) dt.[DayOfWeek]
,tr.[MedallionID]
,tr.[HackneyLicenseID]
,tr.[PickupTimeID]
,tr.[DropoffTimeID]
,tr.[PickupGeographyID]
,tr.[DropoffGeographyID]
,tr.[PickupLatitude]
,tr.[PickupLongitude]
,tr.[PickupLatLong]
,tr.[DropoffLatitude]
,tr.[DropoffLongitude]
,tr.[DropoffLatLong]
,tr.[PassengerCount]
,tr.[TripDurationSeconds]
,tr.[TripDistanceMiles]
,tr.[PaymentType]
,tr.[FareAmount]
,tr.[SurchargeAmount]
,tr.[TaxAmount]
,tr.[TipAmount]
,tr.[TollsAmount]
,tr.[TotalAmount]
FROM [dbo].[Trip] as tr
join
dbo.[Date] as dt
on tr.DateID = dt.DateID