add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
Help with an interesting Postgres question: Why isn't an Index Only Scan used on a partition accessed via the parent table?.
DROP TABLE
CREATE TABLE
INSERT 0 1
DROP TABLE
CREATE TABLE
INSERT 0 1
DROP TABLE
CREATE TABLE
INSERT 0 1
DROP TABLE
CREATE TABLE
INSERT 0 4
class_id order_id family_id species_id
1 1 1 1
1 1 1 2
1 1 1 3
1 1 1 4
SELECT 4
jsonb_pretty
[
    {
        "id": 1,
        "class": "Class A",
        "orders": [
            {
                "id": 1,
                "order": "Order 1",
                "families": [
                    {
                        "id": 1,
                        "family": "Family 1",
                        "species": [
                            {
                                "id": 1,
                                "species": "Species 1"
                            },
                            {
                                "id": 2,
                                "species": "Species 2"
                            },
                            {
                                "id": 3,
                                "species": "Species 3"
                            },
                            {
                                "id": 4,
                                "species": "Species 4"
                            }
                        ]
                    }
                ]
            }
        ]
    }
]
SELECT 1