Question: I read various articles and found that the latest versions of Windows support the `cURL` command via the `command prompt` right out of the box without any installation. So I am trying to make a simple `cURL` request to my local web server, but it is unable to make the request and get the response. It may be because the cURL request consists of the request body.

If I try to make the same request via `Windows Power Shell`, then it's also not working as expected. So I want to know why I cannot make the cURL request via Command Prompt and Power Shell.

Following is a sample cURL request that I am trying to make:

```
curl -X 'POST' \
  'http://localhost:9010/api/generatePersons?pretty=false' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
    "persons": [{
        "nodeId": 1,
        "eventType": "persons",
        "personID": false,
        "refPersons": [],
        "parent": {},
        "child": []
    }]
}'

```

Answer: 
```
WITH data(transaction_date, item_ids) AS (
    SELECT TO_DATE('10/11/2022','MM/DD/YYYY'), 'a;b;z' FROM DUAL UNION ALL
    SELECT TO_DATE('10/10/2022','MM/DD/YYYY'), 'a;d' FROM DUAL UNION ALL    
    SELECT TO_DATE('10/9/2022','MM/DD/YYYY'), 'a;b;d;z' FROM DUAL UNION ALL       
    SELECT TO_DATE('10/8/2022','MM/DD/YYYY'), 'z;e' FROM DUAL 
),
all_ids(id) AS (
    SELECT regexp_substr('a;b;d;e;g;z','[^;]+',1,LEVEL) FROM DUAL
    CONNECT BY regexp_substr('a;b;d;e;g;z','[^;]+',1,LEVEL) IS NOT NULL
),
expanded_ids AS (
    SELECT id, MAX(transaction_date) AS latest_transaction FROM (
        SELECT transaction_date, regexp_substr(item_ids,'[^;]+',1,LEVEL) AS id FROM data
        CONNECT BY regexp_substr(item_ids,'[^;]+',1,LEVEL) IS NOT NULL
            AND PRIOR transaction_date = transaction_date AND PRIOR sys_guid() IS NOT NULL
    )
    GROUP BY id
)
SELECT a.id, e.latest_transaction 
FROM all_ids a 
LEFT JOIN expanded_ids e ON e.id = a.id
ORDER BY id
;

```
You can accomplish this with a CTE and `regexp_substr`:

```
with transactions as
(
    select regexp_substr(tbl.Item_ids, '[^;]+', 1, level) Item_id
        , tbl.Transaction_date
    from tbl
    connect by level < length(replace(tbl.Item_ids, ';', '')) + 1
)
select Item_id
    , max(Transaction_date) Latest_transaction
from transactions
group by Item_id
order by Item_id

```

`regexp_substr` will allow you to split a string into a new row based on a delimiter, we then take those rows and find the max `Transaction_date`.

However, this will only give you the characters from `Item_ids` as I am assuming that is the "array" you are talking about. If you can clarify where the `g` result is coming from, I can include that in my answer as well.