home / sakila

payment

20 rows where customer_id = 509

✎ View and edit SQL

This data as json, xlsx, CSV (advanced)

Suggested facets: staff_id, amount, payment_date (date), last_update (date)

payment_id ▼ customer_id staff_id rental_id amount payment_date last_update
13711 509 509 1 1 22 22 4.99 2005-05-25 02:19:23.000 2020-12-23 07:22:23
13712 509 509 1 1 831 831 8.99 2005-05-29 22:50:25.000 2020-12-23 07:22:23
13713 509 509 1 1 1267 1267 2.99 2005-06-15 07:21:21.000 2020-12-23 07:22:23
13714 509 509 2 2 2919 2919 4.99 2005-06-20 04:10:16.000 2020-12-23 07:22:23
13715 509 509 2 2 4139 4139 1.99 2005-07-07 08:17:35.000 2020-12-23 07:22:23
13716 509 509 2 2 4266 4266 4.99 2005-07-07 14:34:50.000 2020-12-23 07:22:23
13717 509 509 2 2 4832 4832 2.99 2005-07-08 18:07:05.000 2020-12-23 07:22:23
13718 509 509 2 2 5008 5008 2.99 2005-07-09 01:31:42.000 2020-12-23 07:22:23
13719 509 509 1 1 6591 6591 5.99 2005-07-12 07:13:46.000 2020-12-23 07:22:23
13720 509 509 1 1 7848 7848 6.99 2005-07-28 09:24:31.000 2020-12-23 07:22:23
13721 509 509 1 1 8114 8114 8.99 2005-07-28 19:14:06.000 2020-12-23 07:22:23
13722 509 509 1 1 8214 8214 5.99 2005-07-28 23:37:57.000 2020-12-23 07:22:23
13723 509 509 2 2 8240 8240 0.99 2005-07-29 00:33:32.000 2020-12-23 07:22:23
13724 509 509 1 1 10189 10189 4.99 2005-08-01 00:25:00.000 2020-12-23 07:22:23
13725 509 509 2 2 10988 10988 5.99 2005-08-02 04:38:17.000 2020-12-23 07:22:23
13726 509 509 1 1 11814 11814 6.99 2005-08-17 12:09:20.000 2020-12-23 07:22:23
13727 509 509 2 2 12109 12109 4.99 2005-08-17 22:58:35.000 2020-12-23 07:22:23
13728 509 509 2 2 14045 14045 4.99 2005-08-20 21:50:11.000 2020-12-23 07:22:23
13729 509 509 2 2 14994 14994 5.99 2005-08-22 07:52:24.000 2020-12-23 07:22:23
13730 509 509 1 1 15965 15965 2.99 2005-08-23 19:46:39.000 2020-12-23 07:22:23

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE payment (
  payment_id int NOT NULL,
  customer_id INT  NOT NULL,
  staff_id SMALLINT NOT NULL,
  rental_id INT DEFAULT NULL,
  amount DECIMAL(5,2) NOT NULL,
  payment_date TIMESTAMP NOT NULL,
  last_update TIMESTAMP NOT NULL,
  PRIMARY KEY  (payment_id),
  CONSTRAINT fk_payment_rental FOREIGN KEY (rental_id) REFERENCES rental (rental_id) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT fk_payment_customer FOREIGN KEY (customer_id) REFERENCES customer (customer_id) ,
  CONSTRAINT fk_payment_staff FOREIGN KEY (staff_id) REFERENCES staff (staff_id)
);
CREATE INDEX idx_fk_staff_id ON payment(staff_id)
;
CREATE INDEX idx_fk_customer_id ON payment(customer_id)
;
Powered by Datasette · Queries took 8.786ms