home / sakila

rental

8,040 rows where staff_id = 1

✎ 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
1 2005-05-24 22:53:30.000 367 367 130 130 2005-05-26 22:04:30.000 1 1 2020-12-23 07:15:20
2 2005-05-24 22:54:33.000 1525 1525 459 459 2005-05-28 19:40:33.000 1 1 2020-12-23 07:15:20
3 2005-05-24 23:03:39.000 1711 1711 408 408 2005-06-01 22:12:39.000 1 1 2020-12-23 07:15:20
5 2005-05-24 23:05:21.000 2079 2079 222 222 2005-06-02 04:33:21.000 1 1 2020-12-23 07:15:20
6 2005-05-24 23:08:07.000 2792 2792 549 549 2005-05-27 01:32:07.000 1 1 2020-12-23 07:15:20
9 2005-05-25 00:00:40.000 2580 2580 126 126 2005-05-28 00:22:40.000 1 1 2020-12-23 07:15:20
13 2005-05-25 00:22:55.000 2294 2294 334 334 2005-05-30 04:28:55.000 1 1 2020-12-23 07:15:20
14 2005-05-25 00:31:15.000 2701 2701 446 446 2005-05-26 02:56:15.000 1 1 2020-12-23 07:15:20
15 2005-05-25 00:39:22.000 3049 3049 319 319 2005-06-03 03:30:22.000 1 1 2020-12-23 07:15:20
17 2005-05-25 01:06:36.000 830 830 575 575 2005-05-27 00:43:36.000 1 1 2020-12-23 07:15:20
19 2005-05-25 01:17:24.000 1941 1941 456 456 2005-05-31 06:00:24.000 1 1 2020-12-23 07:15:20
23 2005-05-25 02:40:21.000 4441 4441 438 438 2005-05-29 06:34:21.000 1 1 2020-12-23 07:15:20
24 2005-05-25 02:53:02.000 3273 3273 350 350 2005-05-27 01:15:02.000 1 1 2020-12-23 07:15:20
26 2005-05-25 03:36:50.000 4371 4371 371 371 2005-05-31 00:34:50.000 1 1 2020-12-23 07:15:20
30 2005-05-25 04:01:32.000 3744 3744 430 430 2005-05-30 03:12:32.000 1 1 2020-12-23 07:15:20
31 2005-05-25 04:05:17.000 4482 4482 369 369 2005-05-30 07:15:17.000 1 1 2020-12-23 07:15:20
32 2005-05-25 04:06:21.000 3832 3832 230 230 2005-05-25 23:55:21.000 1 1 2020-12-23 07:15:20
33 2005-05-25 04:18:51.000 1681 1681 272 272 2005-05-27 03:58:51.000 1 1 2020-12-23 07:15:20
36 2005-05-25 04:36:26.000 1308 1308 88 88 2005-05-29 00:31:26.000 1 1 2020-12-23 07:15:20
37 2005-05-25 04:44:31.000 403 403 535 535 2005-05-29 01:03:31.000 1 1 2020-12-23 07:15:20
38 2005-05-25 04:47:44.000 2540 2540 302 302 2005-06-01 00:58:44.000 1 1 2020-12-23 07:15:20
40 2005-05-25 05:09:04.000 2638 2638 413 413 2005-05-27 23:12:04.000 1 1 2020-12-23 07:15:20
41 2005-05-25 05:12:29.000 1761 1761 174 174 2005-06-02 00:28:29.000 1 1 2020-12-23 07:15:20
47 2005-05-25 06:05:20.000 2211 2211 35 35 2005-05-30 03:04:20.000 1 1 2020-12-23 07:15:20
48 2005-05-25 06:20:46.000 1780 1780 282 282 2005-06-02 05:42:46.000 1 1 2020-12-23 07:15:20
51 2005-05-25 06:49:10.000 1257 1257 256 256 2005-05-26 06:42:10.000 1 1 2020-12-23 07:15:20
55 2005-05-25 08:26:13.000 1139 1139 131 131 2005-05-30 10:57:13.000 1 1 2020-12-23 07:15:20
56 2005-05-25 08:28:11.000 1352 1352 511 511 2005-05-26 14:21:11.000 1 1 2020-12-23 07:15:20
58 2005-05-25 08:53:14.000 3050 3050 323 323 2005-05-28 14:40:14.000 1 1 2020-12-23 07:15:20
59 2005-05-25 08:56:42.000 2884 2884 408 408 2005-06-01 09:52:42.000 1 1 2020-12-23 07:15:20
60 2005-05-25 08:58:25.000 330 330 470 470 2005-05-30 14:14:25.000 1 1 2020-12-23 07:15:21
62 2005-05-25 09:18:52.000 261 261 419 419 2005-05-30 10:55:52.000 1 1 2020-12-23 07:15:21
63 2005-05-25 09:19:16.000 4008 4008 383 383 2005-05-27 04:24:16.000 1 1 2020-12-23 07:15:21
64 2005-05-25 09:21:29.000 79 79 368 368 2005-06-03 11:31:29.000 1 1 2020-12-23 07:15:21
65 2005-05-25 09:32:03.000 3552 3552 346 346 2005-05-29 14:21:03.000 1 1 2020-12-23 07:15:21
71 2005-05-25 10:26:39.000 2408 2408 100 100 2005-05-28 04:59:39.000 1 1 2020-12-23 07:15:21
75 2005-05-25 11:13:34.000 3393 3393 510 510 2005-06-03 12:58:34.000 1 1 2020-12-23 07:15:21
82 2005-05-25 12:17:46.000 1388 1388 427 427 2005-06-01 10:48:46.000 1 1 2020-12-23 07:15:21
83 2005-05-25 12:30:15.000 466 466 131 131 2005-05-27 15:40:15.000 1 1 2020-12-23 07:15:21
84 2005-05-25 12:36:30.000 1829 1829 492 492 2005-05-29 18:33:30.000 1 1 2020-12-23 07:15:21
85 2005-05-25 13:05:34.000 470 470 414 414 2005-05-29 16:53:34.000 1 1 2020-12-23 07:15:21
86 2005-05-25 13:36:12.000 2275 2275 266 266 2005-05-30 14:53:12.000 1 1 2020-12-23 07:15:21
89 2005-05-25 14:28:29.000 2181 2181 499 499 2005-05-29 14:33:29.000 1 1 2020-12-23 07:15:21
90 2005-05-25 14:31:25.000 2984 2984 25 25 2005-06-01 10:07:25.000 1 1 2020-12-23 07:15:21
91 2005-05-25 14:57:22.000 139 139 267 267 2005-06-01 18:32:22.000 1 1 2020-12-23 07:15:21
93 2005-05-25 15:54:16.000 4360 4360 288 288 2005-06-03 20:18:16.000 1 1 2020-12-23 07:15:21
94 2005-05-25 16:03:42.000 1675 1675 197 197 2005-05-30 14:23:42.000 1 1 2020-12-23 07:15:21
99 2005-05-25 16:50:20.000 535 535 44 44 2005-05-28 18:52:20.000 1 1 2020-12-23 07:15:21
100 2005-05-25 16:50:28.000 2599 2599 208 208 2005-06-02 22:11:28.000 1 1 2020-12-23 07:15:21
101 2005-05-25 17:17:04.000 617 617 468 468 2005-05-31 19:47:04.000 1 1 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 78.03ms