home / sakila

rental

25 rows where customer_id = 98

✎ 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
214 2005-05-26 08:48:49.000 1453 1453 98 98 2005-05-31 04:06:49.000 2 2 2020-12-23 07:15:22
1362 2005-06-15 13:53:32.000 4524 4524 98 98 2005-06-19 16:05:32.000 1 1 2020-12-23 07:15:38
1590 2005-06-16 05:11:41.000 3685 3685 98 98 2005-06-23 10:11:41.000 1 1 2020-12-23 07:15:41
2213 2005-06-18 02:36:47.000 949 949 98 98 2005-06-23 05:02:47.000 1 1 2020-12-23 07:15:50
2445 2005-06-18 19:02:11.000 2887 2887 98 98 2005-06-23 22:25:11.000 1 1 2020-12-23 07:15:53
2601 2005-06-19 06:09:44.000 2898 2898 98 98 2005-06-20 08:03:44.000 1 1 2020-12-23 07:15:55
3399 2005-06-21 15:47:48.000 619 619 98 98 2005-06-26 13:46:48.000 1 1 2020-12-23 07:16:06
3682 2005-07-06 09:22:48.000 2597 2597 98 98 2005-07-14 11:17:48.000 2 2 2020-12-23 07:16:11
4549 2005-07-08 04:25:03.000 2797 2797 98 98 2005-07-10 09:01:03.000 2 2 2020-12-23 07:16:24
6951 2005-07-26 23:47:31.000 3348 3348 98 98 2005-07-31 22:17:31.000 1 1 2020-12-23 07:16:59
7120 2005-07-27 05:56:39.000 416 416 98 98 2005-08-04 10:57:39.000 1 1 2020-12-23 07:17:01
7530 2005-07-27 21:18:58.000 3810 3810 98 98 2005-07-31 01:51:58.000 2 2 2020-12-23 07:17:08
8324 2005-07-29 03:56:05.000 1467 1467 98 98 2005-08-02 01:41:05.000 1 1 2020-12-23 07:17:19
8622 2005-07-29 13:53:28.000 4076 4076 98 98 2005-07-31 16:12:28.000 2 2 2020-12-23 07:17:24
8818 2005-07-29 22:14:04.000 3090 3090 98 98 2005-08-07 17:26:04.000 1 1 2020-12-23 07:17:27
9753 2005-07-31 09:22:38.000 3529 3529 98 98 2005-08-01 08:45:38.000 1 1 2020-12-23 07:17:40
10694 2005-08-01 18:15:07.000 3429 3429 98 98 2005-08-10 15:38:07.000 1 1 2020-12-23 07:17:54
10925 2005-08-02 02:24:38.000 1475 1475 98 98 2005-08-03 05:06:38.000 1 1 2020-12-23 07:17:57
11007 2005-08-02 05:05:53.000 4172 4172 98 98 2005-08-05 01:56:53.000 2 2 2020-12-23 07:17:58
11200 2005-08-02 11:48:36.000 2730 2730 98 98 2005-08-07 08:35:36.000 2 2 2020-12-23 07:18:00
11635 2005-08-17 04:33:17.000 2642 2642 98 98 2005-08-21 07:50:17.000 2 2 2020-12-23 07:18:06
11730 2005-08-17 08:22:00.000 3817 3817 98 98 2005-08-22 05:43:00.000 2 2 2020-12-23 07:18:08
12221 2005-08-18 02:50:51.000 2488 2488 98 98 2005-08-27 06:22:51.000 2 2 2020-12-23 07:18:14
14459 2005-08-21 12:48:08.000 1532 1532 98 98 2005-08-27 10:50:08.000 2 2 2020-12-23 07:18:47
15536 2005-08-23 03:58:28.000 4004 4004 98 98 2005-08-31 03:28:28.000 2 2 2020-12-23 07:19:03

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