home / sakila

rental

25 rows where customer_id = 531

✎ View and edit SQL

This data as json, xlsx, CSV (advanced)

Suggested facets: staff_id, last_update, rental_date (date), return_date (date), last_update (date)

rental_id ▼ rental_date inventory_id customer_id return_date staff_id last_update
233 2005-05-26 11:43:44.000 715 715 531 531 2005-05-28 17:28:44.000 2 2 2020-12-23 07:15:23
681 2005-05-28 23:39:44.000 3346 3346 531 531 2005-06-01 01:42:44.000 1 1 2020-12-23 07:15:28
2972 2005-06-20 07:57:54.000 2232 2232 531 531 2005-06-21 12:48:54.000 1 1 2020-12-23 07:16:00
3921 2005-07-06 20:29:48.000 949 949 531 531 2005-07-14 01:44:48.000 1 1 2020-12-23 07:16:14
5587 2005-07-10 04:17:25.000 4485 4485 531 531 2005-07-15 01:41:25.000 1 1 2020-12-23 07:16:39
5850 2005-07-10 17:36:27.000 4015 4015 531 531 2005-07-15 16:44:27.000 2 2 2020-12-23 07:16:43
5904 2005-07-10 20:39:44.000 350 350 531 531 2005-07-13 17:57:44.000 2 2 2020-12-23 07:16:44
6756 2005-07-12 15:08:28.000 1174 1174 531 531 2005-07-13 14:25:28.000 2 2 2020-12-23 07:16:56
6876 2005-07-12 20:32:50.000 34 34 531 531 2005-07-16 21:12:50.000 1 1 2020-12-23 07:16:58
7204 2005-07-27 09:02:31.000 2512 2512 531 531 2005-08-03 08:56:31.000 2 2 2020-12-23 07:17:03
7391 2005-07-27 16:00:00.000 1153 1153 531 531 2005-08-04 18:07:00.000 2 2 2020-12-23 07:17:06
7444 2005-07-27 17:49:16.000 120 120 531 531 2005-07-28 15:05:16.000 1 1 2020-12-23 07:17:06
7753 2005-07-28 06:09:19.000 3071 3071 531 531 2005-08-06 06:17:19.000 1 1 2020-12-23 07:17:11
8359 2005-07-29 05:02:12.000 140 140 531 531 2005-08-04 08:52:12.000 1 1 2020-12-23 07:17:20
8860 2005-07-29 23:45:57.000 2841 2841 531 531 2005-08-06 02:14:57.000 2 2 2020-12-23 07:17:27
8943 2005-07-30 03:06:48.000 3698 3698 531 531 2005-08-02 00:59:48.000 2 2 2020-12-23 07:17:28
9107 2005-07-30 08:52:45.000 1068 1068 531 531 2005-08-05 08:39:45.000 2 2 2020-12-23 07:17:31
10920 2005-08-02 02:14:10.000 3106 3106 531 531 2005-08-06 23:36:10.000 1 1 2020-12-23 07:17:57
10941 2005-08-02 03:11:33.000 2132 2132 531 531 2005-08-10 07:31:33.000 1 1 2020-12-23 07:17:57
11026 2005-08-02 05:46:05.000 3554 3554 531 531 2005-08-07 06:27:05.000 2 2 2020-12-23 07:17:58
11265 2005-08-02 14:05:42.000 3870 3870 531 531 2005-08-11 15:27:42.000 2 2 2020-12-23 07:18:01
11666 2005-08-17 05:45:10.000 250 250 531 531 2005-08-19 06:47:10.000 2 2 2020-12-23 07:18:07
12923 2005-08-19 04:50:20.000 1390 1390 531 531 2005-08-22 10:42:20.000 1 1 2020-12-23 07:18:24
13300 2005-08-19 18:46:56.000 842 842 531 531 2005-08-28 20:23:56.000 2 2 2020-12-23 07:18:30
15360 2005-08-22 21:36:51.000 1950 1950 531 531 2005-08-24 16:46:51.000 1 1 2020-12-23 07:19:00

Advanced export

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

CSV options:

CREATE TABLE rental (
  rental_id INT NOT NULL,
  rental_date TIMESTAMP NOT NULL,
  inventory_id INT  NOT NULL,
  customer_id INT  NOT NULL,
  return_date TIMESTAMP DEFAULT NULL,
  staff_id SMALLINT  NOT NULL,
  last_update TIMESTAMP NOT NULL,
  PRIMARY KEY (rental_id),
  CONSTRAINT fk_rental_staff FOREIGN KEY (staff_id) REFERENCES staff (staff_id) ,
  CONSTRAINT fk_rental_inventory FOREIGN KEY (inventory_id) REFERENCES inventory (inventory_id) ,
  CONSTRAINT fk_rental_customer FOREIGN KEY (customer_id) REFERENCES customer (customer_id)
);
CREATE INDEX idx_rental_fk_inventory_id ON rental(inventory_id)
;
CREATE INDEX idx_rental_fk_customer_id ON rental(customer_id)
;
CREATE INDEX idx_rental_fk_staff_id ON rental(staff_id)
;
CREATE UNIQUE INDEX idx_rental_uq  ON rental (rental_date,inventory_id,customer_id)
;
Powered by Datasette · Queries took 11.145ms