home / sakila

payment

14 rows where customer_id = 61

✎ 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
1672 61 61 1 1 1157 1157 0.99 2005-05-31 22:47:45.000 2020-12-23 07:19:33
1673 61 61 1 1 7027 7027 7.99 2005-07-27 02:50:15.000 2020-12-23 07:19:33
1674 61 61 2 2 7071 7071 1.99 2005-07-27 04:01:15.000 2020-12-23 07:19:33
1675 61 61 2 2 8029 8029 6.99 2005-07-28 16:11:21.000 2020-12-23 07:19:33
1676 61 61 2 2 8075 8075 4.99 2005-07-28 17:37:28.000 2020-12-23 07:19:33
1677 61 61 1 1 8651 8651 3.99 2005-07-29 15:02:18.000 2020-12-23 07:19:33
1678 61 61 2 2 9597 9597 6.99 2005-07-31 03:29:07.000 2020-12-23 07:19:33
1679 61 61 2 2 10549 10549 0.99 2005-08-01 12:46:39.000 2020-12-23 07:19:33
1680 61 61 2 2 11379 11379 2.99 2005-08-02 18:16:55.000 2020-12-23 07:19:33
1681 61 61 1 1 12072 12072 9.99 2005-08-17 21:50:25.000 2020-12-23 07:19:33
1682 61 61 1 1 13450 13450 0.99 2005-08-20 00:18:15.000 2020-12-23 07:19:33
1683 61 61 1 1 13830 13830 0.99 2005-08-20 13:57:59.000 2020-12-23 07:19:33
1684 61 61 2 2 15089 15089 6.99 2005-08-22 11:34:06.000 2020-12-23 07:19:33
1685 61 61 1 1 15681 15681 1.99 2005-08-23 09:35:34.000 2020-12-23 07:19:33

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