home / sakila

payment

20 rows where customer_id = 310

✎ 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
8412 310 310 2 2 104 104 0.99 2005-05-25 17:46:33.000 2020-12-23 07:21:09
8413 310 310 2 2 1162 1162 4.99 2005-06-14 23:09:38.000 2020-12-23 07:21:09
8414 310 310 2 2 1333 1333 2.99 2005-06-15 11:37:08.000 2020-12-23 07:21:09
8415 310 310 2 2 1918 1918 3.99 2005-06-17 05:40:14.000 2020-12-23 07:21:09
8416 310 310 2 2 2088 2088 6.99 2005-06-17 17:35:30.000 2020-12-23 07:21:09
8417 310 310 1 1 2480 2480 5.99 2005-06-18 21:04:09.000 2020-12-23 07:21:09
8418 310 310 1 1 2618 2618 2.99 2005-06-19 08:03:01.000 2020-12-23 07:21:09
8419 310 310 2 2 3830 3830 10.99 2005-07-06 16:01:16.000 2020-12-23 07:21:09
8420 310 310 1 1 4072 4072 0.99 2005-07-07 04:48:02.000 2020-12-23 07:21:09
8421 310 310 1 1 5621 5621 5.99 2005-07-10 05:34:10.000 2020-12-23 07:21:09
8422 310 310 2 2 5836 5836 0.99 2005-07-10 16:49:02.000 2020-12-23 07:21:09
8423 310 310 1 1 7648 7648 5.99 2005-07-28 01:35:33.000 2020-12-23 07:21:09
8424 310 310 2 2 8637 8637 5.99 2005-07-29 14:30:11.000 2020-12-23 07:21:09
8425 310 310 1 1 8981 8981 7.99 2005-07-30 04:25:30.000 2020-12-23 07:21:09
8426 310 310 1 1 9536 9536 2.99 2005-07-31 01:19:02.000 2020-12-23 07:21:09
8427 310 310 2 2 11137 11137 2.99 2005-08-02 09:25:31.000 2020-12-23 07:21:09
8428 310 310 2 2 12500 12500 4.99 2005-08-18 13:05:51.000 2020-12-23 07:21:09
8429 310 310 2 2 12710 12710 7.99 2005-08-18 21:02:50.000 2020-12-23 07:21:09
8430 310 310 1 1 12929 12929 4.99 2005-08-19 05:05:23.000 2020-12-23 07:21:09
8431 310 310 1 1 14972 14972 5.99 2005-08-22 06:53:21.000 2020-12-23 07:21:09

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 13.203ms