home / sakila

rental

8,004 rows where staff_id = 2

✎ View and edit SQL

This data as json, xlsx, CSV (advanced)

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

rental_id ▼ rental_date inventory_id customer_id return_date staff_id last_update
4 2005-05-24 23:04:41.000 2452 2452 333 333 2005-06-03 01:43:41.000 2 2 2020-12-23 07:15:20
7 2005-05-24 23:11:53.000 3995 3995 269 269 2005-05-29 20:34:53.000 2 2 2020-12-23 07:15:20
8 2005-05-24 23:31:46.000 2346 2346 239 239 2005-05-27 23:33:46.000 2 2 2020-12-23 07:15:20
10 2005-05-25 00:02:21.000 1824 1824 399 399 2005-05-31 22:44:21.000 2 2 2020-12-23 07:15:20
11 2005-05-25 00:09:02.000 4443 4443 142 142 2005-06-02 20:56:02.000 2 2 2020-12-23 07:15:20
12 2005-05-25 00:19:27.000 1584 1584 261 261 2005-05-30 05:44:27.000 2 2 2020-12-23 07:15:20
16 2005-05-25 00:43:11.000 389 389 316 316 2005-05-26 04:42:11.000 2 2 2020-12-23 07:15:20
18 2005-05-25 01:10:47.000 3376 3376 19 19 2005-05-31 06:35:47.000 2 2 2020-12-23 07:15:20
20 2005-05-25 01:48:41.000 3517 3517 185 185 2005-05-27 02:20:41.000 2 2 2020-12-23 07:15:20
21 2005-05-25 01:59:46.000 146 146 388 388 2005-05-26 01:01:46.000 2 2 2020-12-23 07:15:20
22 2005-05-25 02:19:23.000 727 727 509 509 2005-05-26 04:52:23.000 2 2 2020-12-23 07:15:20
25 2005-05-25 03:21:20.000 3961 3961 37 37 2005-05-27 21:25:20.000 2 2 2020-12-23 07:15:20
27 2005-05-25 03:41:50.000 1225 1225 301 301 2005-05-30 01:13:50.000 2 2 2020-12-23 07:15:20
28 2005-05-25 03:42:37.000 4068 4068 232 232 2005-05-26 09:26:37.000 2 2 2020-12-23 07:15:20
29 2005-05-25 03:47:12.000 611 611 44 44 2005-05-30 00:31:12.000 2 2 2020-12-23 07:15:20
34 2005-05-25 04:19:28.000 2613 2613 597 597 2005-05-29 00:10:28.000 2 2 2020-12-23 07:15:20
35 2005-05-25 04:24:36.000 1286 1286 484 484 2005-05-27 07:02:36.000 2 2 2020-12-23 07:15:20
39 2005-05-25 04:51:46.000 4466 4466 207 207 2005-05-31 03:14:46.000 2 2 2020-12-23 07:15:20
42 2005-05-25 05:24:58.000 380 380 523 523 2005-05-31 02:47:58.000 2 2 2020-12-23 07:15:20
43 2005-05-25 05:39:25.000 2578 2578 532 532 2005-05-26 06:54:25.000 2 2 2020-12-23 07:15:20
44 2005-05-25 05:53:23.000 3098 3098 207 207 2005-05-29 10:56:23.000 2 2 2020-12-23 07:15:20
45 2005-05-25 05:59:39.000 1853 1853 436 436 2005-06-02 09:56:39.000 2 2 2020-12-23 07:15:20
46 2005-05-25 06:04:08.000 3318 3318 7 7 2005-06-02 08:18:08.000 2 2 2020-12-23 07:15:20
49 2005-05-25 06:39:35.000 2965 2965 498 498 2005-05-30 10:12:35.000 2 2 2020-12-23 07:15:20
50 2005-05-25 06:44:53.000 1983 1983 18 18 2005-05-28 11:28:53.000 2 2 2020-12-23 07:15:20
52 2005-05-25 06:51:29.000 4017 4017 507 507 2005-05-31 01:27:29.000 2 2 2020-12-23 07:15:20
53 2005-05-25 07:19:16.000 1255 1255 569 569 2005-05-27 05:19:16.000 2 2 2020-12-23 07:15:20
54 2005-05-25 07:23:25.000 2787 2787 291 291 2005-06-01 05:05:25.000 2 2 2020-12-23 07:15:20
57 2005-05-25 08:43:32.000 3938 3938 6 6 2005-05-29 06:42:32.000 2 2 2020-12-23 07:15:20
61 2005-05-25 09:01:57.000 4210 4210 250 250 2005-06-02 07:22:57.000 2 2 2020-12-23 07:15:21
66 2005-05-25 09:35:12.000 1162 1162 86 86 2005-05-29 04:16:12.000 2 2 2020-12-23 07:15:21
67 2005-05-25 09:41:01.000 239 239 119 119 2005-05-27 13:46:01.000 2 2 2020-12-23 07:15:21
68 2005-05-25 09:47:31.000 4029 4029 120 120 2005-05-31 10:20:31.000 2 2 2020-12-23 07:15:21
69 2005-05-25 10:10:14.000 3207 3207 305 305 2005-05-27 14:02:14.000 2 2 2020-12-23 07:15:21
70 2005-05-25 10:15:23.000 2168 2168 73 73 2005-05-27 05:56:23.000 2 2 2020-12-23 07:15:21
72 2005-05-25 10:52:13.000 2260 2260 48 48 2005-05-28 05:52:13.000 2 2 2020-12-23 07:15:21
73 2005-05-25 11:00:07.000 517 517 391 391 2005-06-01 13:56:07.000 2 2 2020-12-23 07:15:21
74 2005-05-25 11:09:48.000 1744 1744 265 265 2005-05-26 12:23:48.000 2 2 2020-12-23 07:15:21
76 2005-05-25 11:30:37.000 3021 3021 1 1 2005-06-03 12:00:37.000 2 2 2020-12-23 07:15:21
77 2005-05-25 11:31:59.000 1303 1303 451 451 2005-05-26 16:53:59.000 2 2 2020-12-23 07:15:21
78 2005-05-25 11:35:18.000 4067 4067 135 135 2005-05-31 12:48:18.000 2 2 2020-12-23 07:15:21
79 2005-05-25 12:11:07.000 3299 3299 245 245 2005-06-03 10:54:07.000 2 2 2020-12-23 07:15:21
80 2005-05-25 12:12:07.000 2478 2478 314 314 2005-05-31 17:46:07.000 2 2 2020-12-23 07:15:21
81 2005-05-25 12:15:19.000 2610 2610 286 286 2005-06-02 14:08:19.000 2 2 2020-12-23 07:15:21
87 2005-05-25 13:52:43.000 1586 1586 331 331 2005-05-29 11:12:43.000 2 2 2020-12-23 07:15:21
88 2005-05-25 14:13:54.000 2221 2221 53 53 2005-05-29 09:32:54.000 2 2 2020-12-23 07:15:21
92 2005-05-25 15:38:46.000 775 775 302 302 2005-05-31 13:40:46.000 2 2 2020-12-23 07:15:21
95 2005-05-25 16:12:52.000 178 178 400 400 2005-06-02 18:55:52.000 2 2 2020-12-23 07:15:21
96 2005-05-25 16:32:19.000 3418 3418 49 49 2005-05-30 10:47:19.000 2 2 2020-12-23 07:15:21
97 2005-05-25 16:34:24.000 1283 1283 263 263 2005-05-28 12:13:24.000 2 2 2020-12-23 07:15:21

Next page

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