home / sakila

payment

12 rows where customer_id = 318

✎ 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
8611 318 318 1 1 224 224 9.99 2005-05-26 10:18:27.000 2020-12-23 07:21:12
8612 318 318 1 1 2634 2634 2.99 2005-06-19 08:55:17.000 2020-12-23 07:21:12
8613 318 318 1 1 2643 2643 2.99 2005-06-19 09:39:27.000 2020-12-23 07:21:12
8614 318 318 2 2 3337 3337 0.99 2005-06-21 10:24:35.000 2020-12-23 07:21:12
8615 318 318 2 2 3376 3376 7.99 2005-06-21 13:43:02.000 2020-12-23 07:21:12
8616 318 318 1 1 3732 3732 4.99 2005-07-06 11:33:37.000 2020-12-23 07:21:12
8617 318 318 2 2 3974 3974 2.99 2005-07-06 22:59:16.000 2020-12-23 07:21:12
8618 318 318 1 1 4356 4356 8.99 2005-07-07 19:21:22.000 2020-12-23 07:21:12
8619 318 318 1 1 7649 7649 0.99 2005-07-28 01:37:26.000 2020-12-23 07:21:12
8620 318 318 2 2 7853 7853 0.99 2005-07-28 09:36:38.000 2020-12-23 07:21:12
8621 318 318 2 2 10023 10023 5.99 2005-07-31 18:25:51.000 2020-12-23 07:21:12
8622 318 318 1 1 14276 14276 2.99 2005-08-21 06:34:05.000 2020-12-23 07:21:12

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