← All tables and views

Shipping view

latest_attempts

Native view in the Shipping sample database.

8rows

6 columns

Schema from the provider contract
ColumnTypeNullableKeyReferences
attempt_idyes——
request_idyes——
attempt_noyes——
config_revisionyes——
started_atyes——
stateyes——

View definition

CREATE VIEW latest_attempts AS SELECT a.* FROM attempts a WHERE NOT EXISTS(SELECT 1 FROM attempts newer WHERE newer.request_id=a.request_id AND newer.attempt_no>a.attempt_no)

Data preview

Sample records

8 rows available
attempt_idrequest_idattempt_noconfig_revisionstarted_atstate
attempt-11038-1request-110381172018-04-30T09:00:00Zaccepted
attempt-11045-1request-110451172018-05-20T09:00:00Zblocked
attempt-11062-1request-110621172018-05-20T09:00:00Zblocked
attempt-90001-1request-900011172018-05-20T09:00:00Zblocked
attempt-90002-1request-900021172018-05-20T09:00:00Zblocked
attempt-90003-1request-900031172018-05-20T09:00:00Zblocked
attempt-90004-1request-900041172018-05-20T09:00:00Zblocked
attempt-90005-1request-900051172018-05-20T09:00:00Zblocked