home / sakila

rental

35 rows where customer_id = 506

✎ View and edit SQL

This data as json, xlsx, CSV (advanced)

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

rental_id ▼ rental_date inventory_id customer_id return_date staff_id last_update
114 2005-05-25 19:12:42.000 4502 4502 506 506 2005-06-01 23:10:42.000 1 1 2020-12-23 07:15:21
387 2005-05-27 10:35:27.000 2684 2684 506 506 2005-06-01 13:37:27.000 2 2 2020-12-23 07:15:25
410 2005-05-27 14:11:22.000 4010 4010 506 506 2005-06-02 20:06:22.000 2 2 2020-12-23 07:15:25
547 2005-05-28 07:24:28.000 2065 2065 506 506 2005-06-06 01:31:28.000 2 2 2020-12-23 07:15:27
907 2005-05-30 10:37:27.000 3320 3320 506 506 2005-06-02 09:51:27.000 1 1 2020-12-23 07:15:32
1042 2005-05-31 05:53:00.000 3155 3155 506 506 2005-06-01 05:24:00.000 1 1 2020-12-23 07:15:34
1153 2005-05-31 21:36:44.000 2725 2725 506 506 2005-06-10 01:26:44.000 2 2 2020-12-23 07:15:35
1446 2005-06-15 19:13:45.000 1989 1989 506 506 2005-06-23 19:43:45.000 2 2 2020-12-23 07:15:39
1467 2005-06-15 20:47:10.000 688 688 506 506 2005-06-22 00:30:10.000 1 1 2020-12-23 07:15:39
1565 2005-06-16 03:13:09.000 3833 3833 506 506 2005-06-16 22:42:09.000 2 2 2020-12-23 07:15:40
2755 2005-06-19 16:56:31.000 946 946 506 506 2005-06-27 12:02:31.000 2 2 2020-12-23 07:15:57
2824 2005-06-19 20:31:45.000 2878 2878 506 506 2005-06-29 00:40:45.000 2 2 2020-12-23 07:15:58
4594 2005-07-08 06:40:06.000 26 26 506 506 2005-07-16 05:51:06.000 2 2 2020-12-23 07:16:24
4640 2005-07-08 08:59:34.000 1147 1147 506 506 2005-07-15 03:31:34.000 1 1 2020-12-23 07:16:25
4806 2005-07-08 17:01:02.000 214 214 506 506 2005-07-15 21:41:02.000 1 1 2020-12-23 07:16:28
5985 2005-07-11 00:51:58.000 1108 1108 506 506 2005-07-14 22:02:58.000 2 2 2020-12-23 07:16:45
6783 2005-07-12 16:27:56.000 3633 3633 506 506 2005-07-13 12:11:56.000 2 2 2020-12-23 07:16:56
7020 2005-07-27 02:24:27.000 3965 3965 506 506 2005-07-29 01:27:27.000 2 2 2020-12-23 07:17:00
8096 2005-07-28 18:32:46.000 502 502 506 506 2005-08-06 15:00:46.000 1 1 2020-12-23 07:17:16
8506 2005-07-29 09:23:52.000 3714 3714 506 506 2005-07-31 04:42:52.000 1 1 2020-12-23 07:17:22
9654 2005-07-31 05:57:42.000 3286 3286 506 506 2005-08-06 04:19:42.000 1 1 2020-12-23 07:17:39
9972 2005-07-31 16:42:43.000 190 190 506 506 2005-08-02 11:05:43.000 2 2 2020-12-23 07:17:43
10477 2005-08-01 10:04:17.000 235 235 506 506 2005-08-06 11:32:17.000 2 2 2020-12-23 07:17:50
10873 2005-08-02 00:30:34.000 169 169 506 506 2005-08-07 00:16:34.000 2 2 2020-12-23 07:17:56
11238 2005-08-02 13:25:50.000 2705 2705 506 506 2005-08-08 19:12:50.000 2 2 2020-12-23 07:18:01
11781 2005-08-17 10:37:00.000 1853 1853 506 506 2005-08-21 12:03:00.000 2 2 2020-12-23 07:18:08
12994 2005-08-19 07:26:10.000 3809 3809 506 506 2005-08-20 07:02:10.000 2 2 2020-12-23 07:18:25
13073 2005-08-19 10:05:38.000 855 855 506 506 2005-08-26 07:37:38.000 2 2 2020-12-23 07:18:26
13767 2005-08-20 11:43:36.000 2739 2739 506 506 2005-08-22 17:10:36.000 1 1 2020-12-23 07:18:37
14074 2005-08-20 23:16:07.000 1303 1303 506 506 2005-08-26 04:45:07.000 1 1 2020-12-23 07:18:42
14337 2005-08-21 08:34:26.000 3529 3529 506 506 2005-08-24 11:31:26.000 1 1 2020-12-23 07:18:46
14395 2005-08-21 10:24:00.000 632 632 506 506 2005-08-28 12:23:00.000 2 2 2020-12-23 07:18:46
15022 2005-08-22 08:55:43.000 249 249 506 506 2005-08-31 05:35:43.000 2 2 2020-12-23 07:18:55
15572 2005-08-23 05:28:01.000 2816 2816 506 506 2005-08-27 00:14:01.000 2 2 2020-12-23 07:19:03
15694 2005-08-23 10:02:46.000 3017 3017 506 506 2005-08-31 05:46:46.000 2 2 2020-12-23 07:19:05

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