D3 sql+executed, run 3: the query session

← back to the run

28 queries0 failed8 rounds
The opening prompt
## The data

You can't see the data, but you can query it. It is in DuckDB, in the tables below. Write DuckDB SQL.

To run queries, reply with one or more fenced blocks (```sql), and nothing else is needed:
each is run and its results sent back to you. You have up to 8 rounds of queries.
When you have what you need, reply with the final answers and no queries.

All columns are text (VARCHAR); dates are ISO strings.

- `entities` (497 rows): entity_id, name, lei, country, entity_type, parent_id, ultimate_parent_id, record_ids
- `instruments` (122 rows): instrument_id, description, issuer_id, guarantor_id, credit_risk_of, seniority, currency, local_currency, maturity
- `ratings` (869 rows): rated_id, rating_type, ccy_basis, rating, outlook, watch, action, valid_from, valid_to, action_id
- `ceilings` (2 rows): country, ceiling, valid_from
- `ancestors` (608 rows): entity_id, ancestor_id, levels_up

These tables are the data after its rules have been applied: duplicate records merged into one entity (record_ids lists the records each entity merges), and each rating with the period it held. An empty valid_to means the rating was still in force on 1 October 2026. ancestors lists every entity above each entity in its chain of parents, with how many levels up.

## Questions

Answer each question below from the data above. Start each answer on a new line with its
number in bold, like **Q1.**, give the direct answer first, then at most two sentences of
reasoning that cite the records (IDs) you relied on.

Then end with one JSON block (```json) holding the structured answer to each question listed
here, with exactly these fields, shaped like {"Q1": {"field": value}, ...}. Name entities by their record ID: the entity_id in the CSV files, or the part of the IRI after lad: in the RDF (E01, not Kestrel Energy plc).

- Q1: rating (a rating, or "none")
- Q2: downgraded ("yes", "no" or "depends")
- Q3: investment_grade ("yes", "no" or "depends"), rating (a rating, or "none")
- Q4: outlook (an outlook)
- Q5: risk_of (a record ID), rating (a rating, or "none")
- Q7: issuers (a list of record IDs)
- Q8: entities (a list of record IDs)
- Q9: count (a number)
- Q10: investment_grade ("yes", "no" or "depends")
- Q11: rating (a rating, or "none")
- Q12: rating (a rating, or "none")
- Q13: count (a number)
- Q14: rating (a rating, or "none")
- Q15: rating (a rating, or "none")
- Q16: changed ("yes", "no" or "depends")
- Q17: downgraded ("yes", "no" or "depends")
- Q18: issuers (a list of record IDs)
- Q19: issuers (a list of record IDs)
- Q20: in_default ("yes", "no" or "depends")
- Q21: entities (a list of record IDs)
- Q22: entities (a list of record IDs)
- Q23: rating (a rating, or "none")
- Q24: investment_grade ("yes", "no" or "depends")
- Q25: count (a number)
- Q26: rating (a rating, or "none")
- Q27: rating (a rating, or "none")
- Q28: rating (a rating, or "none")
- Q29: rating (a rating, or "none")
- Q30: entities (a list of record IDs)
- Q31: any ("yes", "no" or "depends")
- Q32: parent (a record ID)
- Q33: risk_of (a record ID), rating (a rating, or "none")
- Q34: same_group ("yes", "no" or "depends")
- Q35: count (a number)
- Q36: count (a number)
- Q37: count (a number)
- Q38: same ("yes", "no" or "depends")
- Q39: rating (a rating, or "none")
- Q40: count (a number)
- Q41: rating (a rating, or "none")
- Q42: country (a country code)
- Q43: count (a number)
- Q44: local_currency ("yes", "no" or "depends")
- Q45: above_ceiling ("yes", "no" or "depends")
- Q46: issuer_rating ("yes", "no" or "depends")
- Q47: rating (a rating, or "none")
- Q48: count (a number)
- Q49: parent (a record ID)
- Q50: count (a number)
- Q51: count (a number)
- Q52: count (a number)
- Q53: same_group ("yes", "no" or "depends")
- Q54: entities (a list of record IDs)
- Q55: count (a number)
- Q56: rating (a rating, or "none")
- Q57: entity (a record ID)
- Q58: entities (a list of record IDs)
- Q59: count (a number)
- Q60: risk_of (a record ID), same_group ("yes", "no" or "depends")
- Q61: count (a number)

Q1. What was Kestrel Energy's rating on 1 January 2025?
Q2. Has Kestrel Energy been downgraded in 2026?
Q3. Is Kestrel Energy's 2031 note investment grade?
Q4. What is Northwind Holdings' current outlook?
Q5. Whose credit risk does a holder of the Northwind Finance 2030 notes take, and how is it rated?
Q6. Why is Valdoria Telecom's foreign-currency rating lower than its local-currency rating?
Q7. Which issuers were downgraded in 2026?
Q8. Which entities were in default on 1 October 2026?
Q9. As of 1 October 2026, how many distinct issuers hold an issuer rating?
Q10. Is Valdoria Telecom investment grade?
Q11. What was Marlow Utilities' rating on 1 June 2025?
Q12. What was Marlow Utilities' rating on 1 January 2024?
Q13. How many times has Marlow Utilities been downgraded?
Q14. What was Halden Foods' rating on 1 January 2024?
Q15. What was Halden Bank's rating on 1 January 2026?
Q16. Has Marlow Utilities' rating changed since 1 January 2025?
Q17. Was Orrin Bank downgraded in 2026?
Q18. Which issuers were on Rating Watch Negative on 1 October 2026?
Q19. Which issuers had a Negative outlook on 1 October 2026?
Q20. Is Pellam Retail in default?
Q21. Which entities had an issuer rating at some point but no longer had one on 1 October 2026?
Q22. Which entities have ever been in default?
Q23. What is Kestrel Energy's short-term rating?
Q24. Is Kestrel Energy's issuer rating investment grade?
Q25. How many instruments held an investment-grade rating on 1 October 2026?
Q26. What is Corvenia Power's local-currency rating?
Q27. How is Corvenia Power's 2032 note rated?
Q28. What is the Republic of Corvenia's foreign-currency issuer rating?
Q29. What is the Republic of Valdoria's issuer rating?
Q30. Which entities had a foreign-currency issuer rating exactly at their country's ceiling on 1 October 2026?
Q31. Did any company have a foreign-currency issuer rating above its country's ceiling on 1 October 2026?
Q32. Who is Halden Leasing's ultimate parent?
Q33. Whose credit risk does a holder of the Halden Leasing 2028 notes take, and how is it rated?
Q34. Is Halden Foods part of the same group as Halden Bank?
Q35. How many entities are in the Halden group, the parent included?
Q36. How many entities are in the Northwind group, the parent included?
Q37. How many distinct legal entities does the data describe?
Q38. Are Orrin Bank AG and Orrin Bancorp Inc the same entity?
Q39. What is Northwind Holdings' current rating?
Q40. How many distinct issuers domiciled in GB held an issuer rating on 1 October 2026?
Q41. What is Brindle Capital's current rating?
Q42. In which country is Halden Bank domiciled?
Q43. How many distinct entities are domiciled in Luxembourg (LU)?
Q44. Is Valdoria Telecom's 2027 note a local-currency obligation?
Q45. Is Valdoria Telecom's 2027 note rated above what Valdoria's Country Ceiling allows?
Q46. Does Halden Leasing have an issuer rating?
Q47. How is Corvenia Power's 2034 note rated?
Q48. How many instruments held a rating on 1 October 2026?
Q49. Who is Cerid Rosor Holdings SA's ultimate parent?
Q50. How many levels of ownership separate Cerid Rosor Holdings SA from its ultimate parent?
Q51. How many entities are in the Cerid Group plc group, the parent included?
Q52. How many entities are in the Rotam Group Inc group, the parent included?
Q53. Are Belir Mining SA and Rotam Group Inc in the same group?
Q54. Which members of the Wonod Group SA group are domiciled in Valdoria (VD)?
Q55. If Valdoria (VD) came under stress, how many entities with an issuer rating in force have an entity domiciled in VD somewhere above them in their chain of parents?
Q56. What is the lowest current foreign-currency issuer rating held by any member of the Vesol Group BV group?
Q57. Which is the nearest entity that Cerid Guven Energy SA and Cerid Telecom SA both have in their chains of parents?
Q58. Which entities guarantee a note issued by an entity outside their own group?
Q59. How many entities in the Cerid Group plc group sit exactly three levels below the top?
Q60. Whose credit risk does a holder of the Cross-group 4.75% notes due 2031 take, and is that entity in the same group as the issuer?
Q61. How many members of the Cerid Group plc group, the top included, hold a foreign-currency issuer rating below investment grade?
The model
I'll start by exploring the data.

```sql
SELECT * FROM entities WHERE name ILIKE '%Kestrel%' OR name ILIKE '%Northwind%' OR name ILIKE '%Valdoria%' OR name ILIKE '%Marlow%' OR name ILIKE '%Halden%' OR name ILIKE '%Orrin%' OR name ILIKE '%Pellam%' OR name ILIKE '%Corvenia%' OR name ILIKE '%Brindle%' OR name ILIKE '%Cerid Rosor%' OR name ILIKE '%Rotam%' OR name ILIKE '%Belir%' OR name ILIKE '%Wonod%' OR name ILIKE '%Vesol%' ORDER BY name;
```
```sql
SELECT * FROM instruments WHERE description ILIKE '%Kestrel%' OR description ILIKE '%Northwind%' OR description ILIKE '%Valdoria%' OR description ILIKE '%Halden%' OR description ILIKE '%Corvenia%' OR description ILIKE '%Cross-group%' ORDER BY instrument_id;
```
```sql
SELECT * FROM ceilings;
```
Query results
Query 1:

| entity_id | name | lei | country | entity_type | parent_id | ultimate_parent_id | record_ids |
|---|---|---|---|---|---|---|---|
| E5083 | Belir Airlines plc | 815600VWRV7PTZ2G2598 | GB | CORP | E5075 | E5059 | E5083 |
| E5082 | Belir Bovid Telecom plc | 815600N0YPG44MRFH213 | GB | BANK | E5074 | E5059 | E5082 |
| E5067 | Belir Capital AG | 724500PEM92TFIBH3E89 | DE | CORP | E5063 | E5059 | E5067 |
| E5071 | Belir Chemicals SA | 724500EPR0DH4ZXK1N07 | FR | CORP | E5066 | E5059 | E5071 |
| E5080 | Belir Foods AG | 815600W19TGJNKXFFO22 | DE | CORP | E5072 | E5059 | E5080 |
| E5075 | Belir Gitid Industries plc | 815600DW5IX6LC8W8V29 | GB | CORP | E5068 | E5059 | E5075 |
| E5059 | Belir Group AG | 969500YPO4CFVEL1XX12 | DE | CORP |  |  | E5059 |
| E5063 | Belir Harem Property AG | 391200DIHCC3BA4VZZ12 | DE | CORP | E5060 | E5059 | E5063 |
| E5064 | Belir Holdings plc | 724500Q0JKSMWBXVBU93 | GB | CORP | E5061 | E5059 | E5064 |
| E5074 | Belir Industries plc | 549300KXQ2S560AVV453 | GB | CORP | E5068 | E5059 | E5074 |
| E5072 | Belir Katin Telecom AG | 815600R2EBVJ16RD3A20 | DE | CORP | E5067 | E5059 | E5072 |
| E5068 | Belir Kator Energy plc | 969500LH6R0LMYUZA394 | GB | CORP | E5064 | E5059 | E5068 |
| E5084 | Belir Luton Media SA | 815600NALYO1JPB0Y303 | FR | BANK | E5076 | E5059 | E5084 |
| E5077 | Belir Media SA | 213800PX54IYKA21SV31 | FR | CORP | E5069 | E5059 | E5077 |
| E5062 | Belir Mining SA | 54930011OTFCAUKB0A28 | FR | CORP | E5060 | E5059 | E5062 E5168 |
| E5065 | Belir Nelad Property AG | 549300L03V06VLA93J12 | DE | CORP | E5061 | E5059 | E5065 |
| E5076 | Belir Property SA | 96950092K7EM4MPGLP04 | FR | CORP | E5069 | E5059 | E5076 |
| E5073 | Belir Puvir Mining plc | 549300Z4E2ZBV3ZWA751 | GB | CORP | E5067 | E5059 | E5073 |
| E5060 | Belir Retail AG | 549300PQXT9OXKZVXP03 | DE | CORP | E5059 | E5059 | E5060 |
| E5070 | Belir Rusin Media SA | 8156004IQIH39FK9VH78 | FR | CORP | E5066 | E5059 | E5070 |
| E5085 | Belir Rutel Water SA | 213800K6R3NB1ZT7Y709 | CV | CORP | E5077 | E5059 | E5085 |
| E5066 | Belir Shipping SA | 2138006F3FLNO4C1FU85 | FR | CORP | E5062 | E5059 | E5066 |
| E5079 | Belir Sitom Logistics SA | 213800N76YAEEVTGC136 | FR | CORP | E5071 | E5059 | E5079 |
| E5061 | Belir Steel Inc | 5493004QWM1AN9Q59M90 | US | BANK | E5059 | E5059 | E5061 |
| E5078 | Belir Vasin Water plc | 969500OGDTR8B14SH139 | GB | BANK | E5070 | E5059 | E5078 |
| E5081 | Belir Vusad Telecom SA | 549300C58DC34KK7FK00 | VD | CORP | E5073 | E5059 | E5081 |
| E5069 | Belir Water SA | 391200PZ4I0VQJK2W457 | FR | CORP | E5065 | E5059 | E5069 |
| E5047 | Cerid Rosor Holdings SA | 8156004CDHFBVRR3LT54 | VD | BANK | E5035 | E5001 | E5047 |
| E15 | Corvenia Power SA | 213800PBQVHVBBH6GV02 | CV | CORP |  |  | E15 |
| E10 | Halden Bank AG | 391200QYPVFF2O9K2039 | LU | BANK | E09 | E09 | E10 E17 |
| E12 | Halden Foods Ltd | 213800IJDL4OJ4DG5T19 | GB | CORP |  |  | E12 |
| E09 | Halden Group plc | 815600ASM9EHDG931T89 | GB | CORP |  |  | E09 |
| E11 | Halden Leasing SA | 549300XBZH4ULO9MQV55 | FR | FINSUB | E10 | E09 | E11 |
| E01 | Kestrel Energy plc | 7245002OOPBG04092E43 | GB | CORP |  |  | E01 |
| E14 | Marlow Utilities plc | 3912005AH2C1I9YF8106 | GB | CORP |  |  | E14 |
| E04 | Northwind Finance BV | 213800LA5RYJLGXV2T85 | NL | FINSUB | E02 | E02 | E04 |
| E02 | Northwind Holdings plc | 213800PHEIYNJMHTDV74 | GB | CORP |  |  | E02 E03 |
| E13 | Orrin Bancorp Inc | 815600O8X8K2F154N214 | US | BANK |  |  | E13 |
| E06 | Orrin Bank AG | 549300AMVE3VRVG7HK43 | DE | BANK |  |  | E06 |
| E07 | Pellam Retail Ltd | 969500B6IUACELPI2291 | GB | CORP |  |  | E07 |
| CV | Republic of Corvenia |  | CV | SOV |  |  | CV |
| VD | Republic of Valdoria |  | VD | SOV |  |  | VD |
| E5089 | Rotam Airlines Inc | 7245008N6U91AB1U1398 | US | CORP | E5086 | E5086 | E5089 |
| E5097 | Rotam Chemicals Inc | 3912008BZ54JQ8UNFG51 | US | BANK | E5092 | E5086 | E5097 |
| E5095 | Rotam Energy BV | 815600HA1HK1TIMKR785 | NL | BANK | E5091 | E5086 | E5095 |
| E5099 | Rotam Fived Water Inc | 815600UU6JEHIIMLC927 | US | CORP | E5093 | E5086 | E5099 |
| E5101 | Rotam Foods BV | 724500VSL9A06KR45I76 | NL | CORP | E5095 | E5086 | E5101 |
| E5103 | Rotam Goson Energy Inc | 724500LIPSS64F2BVY06 | US | CORP | E5097 | E5086 | E5103 |
| E5086 | Rotam Group Inc | 213800PJV1XFQEKJ1L86 | US | CORP |  |  | E5086 |
| E5092 | Rotam Hison Holdings Inc | 391200GBH7B6XVDLYP36 | US | CORP | E5089 | E5086 | E5092 |
| E5094 | Rotam Holdings Inc | 72450096SJSRDS8ZI255 | US | CORP | E5090 | E5086 | E5094 |
| E5088 | Rotam Industries Inc | 72450088A4BIGJ0A1N08 | US | CORP | E5086 | E5086 | E5088 |
| E5090 | Rotam Logistics Inc | 724500J7FCE6HMEBB653 | US | CORP | E5087 | E5086 | E5090 |
| E5096 | Rotam Lulel Mining SA | 549300CUU7XMKSLTTB66 | ES | BANK | E5091 | E5086 | E5096 |
| E5104 | Rotam Media SA | 724500JZITB0L2T1PH98 | CV | CORP | E5098 | E5086 | E5104 |
| E5087 | Rotam Mining Inc | 724500OT1LFBVAVBRI55 | US | CORP | E5086 | E5086 | E5087 |
| E5098 | Rotam Pharma SA | 815600LW5B06S1CQW672 | CV | CORP | E5092 | E5086 | E5098 |
| E5100 | Rotam Property Inc | 724500GA08KIJSPLUI93 | US | BANK | E5094 | E5086 | E5100 |
| E5093 | Rotam Telecom Inc | 391200SIBITK6V9AYU16 | US | CORP | E5090 | E5086 | E5093 |
| E5102 | Rotam Utilities SA | 96950092DKV427KADB93 | ES | CORP | E5096 | E5086 | E5102 |
(42 more rows not shown)

Query 2:

| instrument_id | description | issuer_id | guarantor_id | credit_risk_of | seniority | currency | local_currency | maturity |
|---|---|---|---|---|---|---|---|---|
| I01 | Kestrel Energy 4.50% notes due 2030 | E01 |  | E01 | SU | GBP | no | 2030-03-15 |
| I02 | Kestrel Energy 6.25% notes due 2031 | E01 |  | E01 | SUB | GBP | no | 2031-09-30 |
| I03 | Northwind Finance 3.75% notes due 2030 | E04 | E02 | E02 | SU | EUR | no | 2030-05-01 |
| I04 | Valdoria Telecom 5.00% notes due 2029 | E05 |  | E05 | SU | USD | no | 2029-11-20 |
| I05 | Halden Leasing 2.90% notes due 2028 | E11 | E10 | E10 | SU | EUR | no | 2028-06-30 |
| I06 | Corvenia Power 7.10% notes due 2032 | E15 |  | E15 | SUB | USD | no | 2032-02-15 |
| I07 | Valdoria Telecom 4.25% notes due 2027 | E05 |  | E05 | SU | XVD | yes | 2027-08-31 |
| I08 | Corvenia Power 6.00% notes due 2034 | E15 |  | E15 | SU | USD | no | 2034-09-01 |
| I5007 | Cross-group 4.75% notes due 2031 | E5133 | E5145 | E5145 | SU | USD | no | 2031-06-30 |

Query 3:

| country | ceiling | valid_from |
|---|---|---|
| CV | A | 2024-01-01 |
| VD | BB | 2025-04-01 |

Run more queries, or give the final answers.
The model
<invoke name="sql">
SELECT * FROM ratings WHERE rated_id IN ('E01','E02','E03','E04','E05','E06','E07','E09','E10','E11','E12','E13','E14','E15','E17','CV','VD','I01','I02','I03','I04','I05','I06','I07','I08','I5007') ORDER BY rated_id, rating_type, ccy_basis, valid_from;
</invoke>
```sql
SELECT * FROM entities WHERE entity_id IN ('E05','E03','E17','E5133','E5145','E5001','E5035') ORDER BY entity_id;
```
Query results
Query 1:

| entity_id | name | lei | country | entity_type | parent_id | ultimate_parent_id | record_ids |
|---|---|---|---|---|---|---|---|
| E05 | Valdoria Telecom SA | 391200LESH03LMOY2U61 | VD | CORP |  |  | E05 |
| E5001 | Cerid Group plc | 815600F48PANJQE75352 | GB | CORP |  |  | E5001 |
| E5035 | Cerid Water SA | 724500637K0GA6PFC081 | VD | BANK | E5023 | E5001 | E5035 |
| E5133 | Vesol Foods plc | 969500J32JMVAGT5XX78 | GB | BANK | E5132 | E5132 | E5133 |
| E5145 | Geren Group SA | 8156002XDJU2OFI9JC47 | VD | CORP |  |  | E5145 |

Query 2:

| rated_id | rating_type | ccy_basis | rating | outlook | watch | action | valid_from | valid_to | action_id |
|---|---|---|---|---|---|---|---|---|---|
| CV | LTIDR | FC | BBB+ | STA |  | AS | 2024-01-01 |  | A38 |
| CV | LTIDR | LC | A- | STA |  | AS | 2024-01-01 |  | A39 |
| E01 | LTIDR | FC | A- | STA |  | AS | 2024-03-12 | 2025-06-20 | A01 |
| E01 | LTIDR | FC | BBB | STA |  | DG | 2025-06-20 | 2026-02-10 | A02 |
| E01 | LTIDR | FC | BBB | NEG |  | AF | 2026-02-10 |  | A03 |
| E01 | STIDR | FC | F2 |  |  | AF | 2026-02-10 |  | A04 |
| E02 | LTIDR | FC | A | STA |  | AS | 2023-11-01 | 2025-09-15 | A08 |
| E02 | LTIDR | FC | A | POS |  | AF | 2025-09-15 |  | A09 |
| E05 | LTIDR | FC | BB | STA |  | AS | 2025-04-01 |  | A14 |
| E05 | LTIDR | LC | BBB- | STA |  | AS | 2025-04-01 |  | A13 |
| E06 | LTIDR | FC | A- | STA |  | AS | 2024-05-01 | 2026-09-03 | A16 |
| E06 | LTIDR | FC | A- |  | RWN | RW | 2026-09-03 |  | A17 |
| E07 | LTIDR | FC | BB | STA |  | AS | 2024-01-10 | 2026-05-12 | A18 |
| E07 | LTIDR | FC | WD |  |  | WD | 2026-05-12 |  | A19 |
| E09 | LTIDR | FC | A | STA |  | AS | 2023-05-01 | 2026-03-01 | A24 |
| E09 | LTIDR | FC | A | NEG |  | AF | 2026-03-01 |  | A25 |
| E10 | LTIDR | FC | A- | STA |  | AS | 2023-05-01 | 2026-04-15 | A26 |
| E10 | LTIDR | FC | BBB+ | STA |  | DG | 2026-04-15 |  | A27 |
| E12 | LTIDR | FC | BB- | STA |  | AS | 2024-02-01 | 2025-08-01 | A30 |
| E12 | LTIDR | FC | BB | STA |  | UG | 2025-08-01 |  | A31 |
| E13 | LTIDR | FC | BBB | STA |  | AS | 2024-07-01 |  | A32 |
| E14 | LTIDR | FC | A- | STA |  | AS | 2023-01-15 | 2024-09-30 | A34 |
| E14 | LTIDR | FC | BBB+ | STA |  | DG | 2024-09-30 | 2025-11-20 | A36 |
| E14 | LTIDR | FC | BBB+ |  | RWN | RW | 2025-11-20 | 2026-05-01 | A35 |
| E14 | LTIDR | FC | BBB+ | STA |  | AF | 2026-05-01 |  | A33 |
| E15 | LTIDR | FC | A | STA |  | AS | 2024-03-01 |  | A41 |
| E15 | LTIDR | LC | A+ | STA |  | AS | 2024-03-01 |  | A40 |
| I01 | INST |  | A- |  |  | AS | 2024-03-12 | 2025-06-20 | A05 |
| I01 | INST |  | BBB |  |  | DG | 2025-06-20 |  | A06 |
| I02 | INST |  | BBB |  |  | AS | 2024-03-12 | 2025-06-20 | A23 |
| I02 | INST |  | BB+ |  |  | DG | 2025-06-20 |  | A07 |
| I03 | INST |  | A |  |  | AS | 2023-11-01 | 2025-09-15 | A10 |
| I03 | INST |  | A |  |  | AF | 2025-09-15 |  | A11 |
| I04 | INST |  | BB |  |  | AS | 2025-04-01 |  | A15 |
| I05 | INST |  | A- |  |  | AS | 2023-06-01 | 2026-04-15 | A28 |
| I05 | INST |  | BBB+ |  |  | DG | 2026-04-15 |  | A29 |
| I06 | INST |  | A- |  |  | AS | 2024-03-01 |  | A42 |
| I07 | INST |  | BBB- |  |  | AS | 2025-04-01 |  | A45 |
| I5007 | INST |  | BBB |  |  | AS | 2025-02-14 |  | A5126 |

Run more queries, or give the final answers.
The model
```sql
SELECT rating_type, ccy_basis, action, watch, outlook, count(*) FROM ratings GROUP BY ALL ORDER BY ALL;
```
```sql
SELECT count(*), count(distinct entity_id), count(distinct lei) FROM entities;
```
```sql
SELECT entity_type, count(*) FROM entities GROUP BY 1;
```
```sql
SELECT * FROM entities WHERE country='LU' ORDER BY entity_id;
```
```sql
SELECT * FROM instruments WHERE instrument_id NOT LIKE 'I0%' ORDER BY instrument_id;
```
```sql
SELECT * FROM ratings WHERE rated_id IN (SELECT entity_id FROM entities WHERE ultimate_parent_id='E5001' OR entity_id='E5001') AND valid_to='' ORDER BY rated_id;
```
Query results
Query 1:

| rating_type | ccy_basis | action | watch | outlook | count_star() |
|---|---|---|---|---|---|
| INST |  | AF |  |  | 1 |
| INST |  | AS |  |  | 113 |
| INST |  | DG |  |  | 3 |
| LTIDR | FC | AF |  | NEG | 22 |
| LTIDR | FC | AF |  | POS | 15 |
| LTIDR | FC | AF |  | STA | 44 |
| LTIDR | FC | AS |  | STA | 412 |
| LTIDR | FC | DG |  | NEG | 35 |
| LTIDR | FC | DG |  | POS | 24 |
| LTIDR | FC | DG |  | STA | 34 |
| LTIDR | FC | DG |  |  | 2 |
| LTIDR | FC | RW | RWN |  | 45 |
| LTIDR | FC | UG |  | NEG | 8 |
| LTIDR | FC | UG |  | POS | 10 |
| LTIDR | FC | UG |  | STA | 27 |
| LTIDR | FC | WD |  |  | 39 |
| LTIDR | LC | AF |  | POS | 1 |
| LTIDR | LC | AF |  | STA | 3 |
| LTIDR | LC | AS |  | STA | 19 |
| LTIDR | LC | DG |  | NEG | 1 |
| LTIDR | LC | DG |  | POS | 1 |
| LTIDR | LC | DG |  | STA | 2 |
| LTIDR | LC | RW | RWN |  | 3 |
| LTIDR | LC | UG |  | POS | 1 |
| LTIDR | LC | UG |  | STA | 2 |
| LTIDR | LC | WD |  |  | 1 |
| STIDR | FC | AF |  |  | 1 |

Query 2:

| count_star() | count(DISTINCT entity_id) | count(DISTINCT lei) |
|---|---|---|
| 497 | 497 | 495 |

Query 3:

| entity_type | count_star() |
|---|---|
| SOV | 2 |
| CORP | 393 |
| BANK | 85 |
| FINSUB | 17 |

Query 4:

| entity_id | name | lei | country | entity_type | parent_id | ultimate_parent_id | record_ids |
|---|---|---|---|---|---|---|---|
| E10 | Halden Bank AG | 391200QYPVFF2O9K2039 | LU | BANK | E09 | E09 | E10 E17 |

Query 5:

| instrument_id | description | issuer_id | guarantor_id | credit_risk_of | seniority | currency | local_currency | maturity |
|---|---|---|---|---|---|---|---|---|
| I1001 | Soson Airlines 5.50% notes due 2031 | E1006 |  | E1006 | SUB | USD | no | 2035-06-30 |
| I1002 | Golod Property 8.75% notes due 2031 | E1007 |  | E1007 | SU | USD | no | 2033-06-30 |
| I1003 | Sotil Retail 3.00% notes due 2031 | E1008 |  | E1008 | SU | GBP | no | 2034-06-30 |
| I1004 | Malam Chemicals 2.25% notes due 2035 | E1009 |  | E1009 | SU | USD | no | 2028-06-30 |
| I1005 | Posad Industries 4.00% notes due 2033 | E1012 |  | E1012 | SU | EUR | no | 2031-06-30 |
| I1006 | Pisol Pharma 4.75% notes due 2030 | E1013 |  | E1013 | SUB | USD | no | 2030-06-30 |
| I1007 | Toral Utilities 7.75% notes due 2028 | E1014 |  | E1014 | SU | EUR | no | 2033-06-30 |
| I1008 | Ponar Telecom 4.75% notes due 2035 | E1016 |  | E1016 | SU | EUR | no | 2033-06-30 |
| I1009 | Tosem Mining 2.75% notes due 2031 | E1018 |  | E1018 | SUB | USD | no | 2036-06-30 |
| I1010 | Finel Media 6.50% notes due 2035 | E1020 |  | E1020 | SU | EUR | no | 2036-06-30 |
| I1011 | Niner Pharma 3.25% notes due 2029 | E1021 |  | E1021 | SU | USD | no | 2035-06-30 |
| I1012 | Heled Water 6.25% notes due 2030 | E1023 |  | E1023 | SU | GBP | no | 2031-06-30 |
| I1013 | Kuvir Logistics 2.00% notes due 2027 | E1031 |  | E1031 | SU | EUR | no | 2027-06-30 |
| I1014 | Kavod Utilities 2.50% notes due 2032 | E1035 |  | E1035 | SU | USD | no | 2036-06-30 |
| I1015 | Lanon Telecom 4.75% notes due 2033 | E1038 |  | E1038 | SUB | EUR | no | 2032-06-30 |
| I1016 | Hiral Steel 6.00% notes due 2035 | E1041 |  | E1041 | SU | USD | no | 2034-06-30 |
| I1017 | Lised Pharma 4.50% notes due 2036 | E1048 |  | E1048 | SU | EUR | no | 2029-06-30 |
| I1018 | Paser Utilities 3.75% notes due 2027 | E1049 |  | E1049 | SUB | GBP | no | 2034-06-30 |
| I1019 | Sunar Holdings 8.50% notes due 2036 | E1050 |  | E1050 | SUB | USD | no | 2034-06-30 |
| I1020 | Witad Steel 5.00% notes due 2033 | E1052 |  | E1052 | SU | EUR | no | 2027-06-30 |
| I1021 | Duver Shipping 8.50% notes due 2032 | E1056 |  | E1056 | SU | EUR | no | 2030-06-30 |
| I1022 | Levem Foods 6.50% notes due 2035 | E1067 |  | E1067 | SUB | EUR | no | 2030-06-30 |
| I1023 | Mored Utilities 4.25% notes due 2032 | E1071 |  | E1071 | SUB | USD | no | 2033-06-30 |
| I1024 | Ganed Holdings 5.75% notes due 2035 | E1077 |  | E1077 | SU | EUR | no | 2032-06-30 |
| I1025 | Menir Shipping 7.50% notes due 2028 | E1078 |  | E1078 | SUB | EUR | no | 2034-06-30 |
| I1026 | Nevar Property 6.75% notes due 2036 | E1079 |  | E1079 | SU | GBP | no | 2028-06-30 |
| I1027 | Gilen Capital 2.00% notes due 2031 | E1082 |  | E1082 | SUB | USD | no | 2034-06-30 |
| I1028 | Givim Mining 5.75% notes due 2036 | E1085 |  | E1085 | SU | EUR | no | 2034-06-30 |
| I1029 | Gorar Steel 7.25% notes due 2033 | E1086 |  | E1086 | SUB | USD | no | 2035-06-30 |
| I1030 | Vitid Holdings 5.75% notes due 2032 | E1087 |  | E1087 | SU | EUR | no | 2034-06-30 |
| I1031 | Koved Holdings 2.50% notes due 2032 | E1088 |  | E1088 | SUB | EUR | no | 2033-06-30 |
| I1032 | Getel Utilities 7.25% notes due 2033 | E1090 |  | E1090 | SU | USD | no | 2032-06-30 |
| I1033 | Vavam Pharma 8.75% notes due 2032 | E1103 |  | E1103 | SUB | USD | no | 2032-06-30 |
| I1034 | Kisil Logistics 8.50% notes due 2031 | E1108 |  | E1108 | SU | EUR | no | 2033-06-30 |
| I1035 | Verod Logistics 3.00% notes due 2035 | E1114 |  | E1114 | SU | GBP | no | 2029-06-30 |
| I1036 | Piren Foods 2.50% notes due 2030 | E1115 |  | E1115 | SU | USD | no | 2033-06-30 |
| I1037 | Reter Shipping 8.00% notes due 2028 | E1118 |  | E1118 | SU | EUR | no | 2027-06-30 |
| I1038 | Conan Capital 4.75% notes due 2033 | E1131 |  | E1131 | SU | EUR | no | 2031-06-30 |
| I1039 | Larid Steel 8.50% notes due 2028 | E1141 |  | E1141 | SU | GBP | no | 2033-06-30 |
| I1040 | Woner Media 5.75% notes due 2027 | E1143 |  | E1143 | SUB | EUR | no | 2027-06-30 |
| I1041 | Kanim Pharma 3.25% notes due 2033 | E1145 |  | E1145 | SUB | EUR | no | 2036-06-30 |
| I1042 | Daren Mining 5.75% notes due 2030 | E1147 |  | E1147 | SU | EUR | no | 2035-06-30 |
| I1043 | Honel Shipping 4.50% notes due 2028 | E1149 |  | E1149 | SUB | EUR | no | 2029-06-30 |
| I1044 | Wavad Foods 6.75% notes due 2035 | E1155 |  | E1155 | SU | USD | no | 2036-06-30 |
| I1045 | Ruven Airlines 5.75% notes due 2032 | E1156 |  | E1156 | SUB | EUR | no | 2036-06-30 |
| I1046 | Diled Steel 8.75% notes due 2027 | E1160 |  | E1160 | SU | EUR | no | 2029-06-30 |
| I1047 | Wunam Telecom 5.25% notes due 2032 | E1162 |  | E1162 | SU | EUR | no | 2029-06-30 |
| I1048 | Wenar Water 8.25% notes due 2028 | E1163 |  | E1163 | SUB | EUR | no | 2028-06-30 |
| I1049 | Ranim Shipping 8.00% notes due 2028 | E1166 |  | E1166 | SUB | USD | no | 2036-06-30 |
| I1050 | Fivan Holdings 2.25% notes due 2035 | E1168 |  | E1168 | SU | EUR | no | 2027-06-30 |
| I1051 | Molar Shipping 3.25% notes due 2031 | E1188 |  | E1188 | SU | EUR | no | 2028-06-30 |
| I1052 | Divid Property 4.25% notes due 2033 | E1189 |  | E1189 | SUB | GBP | no | 2032-06-30 |
| I1053 | Piran Logistics 7.25% notes due 2034 | E1190 |  | E1190 | SU | EUR | no | 2028-06-30 |
| I1054 | Lenam Industries 2.50% notes due 2036 | E1195 |  | E1195 | SU | GBP | no | 2030-06-30 |
| I1055 | Kiver Property 8.00% notes due 2032 | E1198 |  | E1198 | SU | EUR | no | 2034-06-30 |
| I1056 | Misam Shipping 8.00% notes due 2036 | E1205 |  | E1205 | SUB | USD | no | 2029-06-30 |
| I1057 | Rival Chemicals 5.25% notes due 2027 | E1206 |  | E1206 | SU | USD | no | 2029-06-30 |
| I1058 | Holar Logistics 5.75% notes due 2030 | E1207 |  | E1207 | SUB | EUR | no | 2029-06-30 |
| I1059 | Nelem Foods 4.75% notes due 2027 | E1208 |  | E1208 | SUB | USD | no | 2031-06-30 |
| I1060 | Winim Mining 4.75% notes due 2035 | E1213 |  | E1213 | SU | EUR | no | 2032-06-30 |
(54 more rows not shown)

Query 6:

(no rows)

Run more queries, or give the final answers.
The model
<invoke name="sql">
SELECT rating, count(*) FROM ratings GROUP BY 1 ORDER BY 1;
</invoke>
```sql
SELECT typeof(valid_to), valid_to IS NULL AS n, count(*) FROM ratings GROUP BY ALL;
```
```sql
SELECT e.entity_id, e.name, e.country, e.parent_id, e.ultimate_parent_id, e.record_ids FROM entities e WHERE e.entity_id IN ('E03','E17','E168','E5168','E5168','E5132','E5086','E5059') OR e.record_ids LIKE '%E03%' OR e.record_ids LIKE '%E17%' OR e.name ILIKE '%Wonod%' OR e.name ILIKE '%Vesol Group%' OR e.name ILIKE '%Brindle%' OR e.name ILIKE '%Orrin%';
```
```sql
SELECT ultimate_parent_id, count(*) FROM entities WHERE ultimate_parent_id IN ('E09','E02','E5001','E5086') GROUP BY 1;
```
```sql
SELECT * FROM ratings WHERE rated_id IN (SELECT entity_id FROM entities WHERE ultimate_parent_id='E5001' OR entity_id='E5001') AND (valid_to IS NULL OR valid_to='') ORDER BY rated_id;
```
Query results
Query 1:

| typeof(valid_to) | n | count_star() |
|---|---|---|
| VARCHAR | False | 324 |
| VARCHAR | True | 545 |

Query 2:

| entity_id | name | country | parent_id | ultimate_parent_id | record_ids |
|---|---|---|---|---|---|
| E02 | Northwind Holdings plc | GB |  |  | E02 E03 |
| E06 | Orrin Bank AG | DE |  |  | E06 |
| E10 | Halden Bank AG | LU | E09 | E09 | E10 E17 |
| E13 | Orrin Bancorp Inc | US |  |  | E13 |
| E5059 | Belir Group AG | DE |  |  | E5059 |
| E5086 | Rotam Group Inc | US |  |  | E5086 |
| E5105 | Wonod Group SA | FR |  |  | E5105 |
| E5106 | Wonod Steel BV | VD | E5105 | E5105 | E5106 E5169 |
| E5107 | Wonod Retail BV | NL | E5105 | E5105 | E5107 |
| E5108 | Wonod Shipping BV | NL | E5106 | E5105 | E5108 |
| E5109 | Wonod Holdings SA | FR | E5106 | E5105 | E5109 |
| E5110 | Wonod Capital BV | NL | E5106 | E5105 | E5110 |
| E5111 | Wonod Airlines SA | CV | E5107 | E5105 | E5111 |
| E5112 | Wonod Telecom BV | NL | E5107 | E5105 | E5112 |
| E5113 | Wonod Wetid Foods BV | NL | E5107 | E5105 | E5113 |
| E5114 | Wonod Pharma Inc | US | E5108 | E5105 | E5114 |
| E5115 | Wonod Water SA | FR | E5109 | E5105 | E5115 |
| E5116 | Wonod Media SA | CV | E5110 | E5105 | E5116 |
| E5117 | Wonod Mining SA | CV | E5111 | E5105 | E5117 |
| E5118 | Wonod Wevan Logistics BV | NL | E5112 | E5105 | E5118 |
| E5119 | Wonod Povem Telecom SA | FR | E5113 | E5105 | E5119 |
| E5120 | Wonod Property Inc | US | E5114 | E5105 | E5120 |
| E5121 | Wonod Energy SA | FR | E5115 | E5105 | E5121 |
| E5122 | Wonod Chemicals SA | FR | E5116 | E5105 | E5122 |
| E5123 | Wonod Utilities SA | ES | E5117 | E5105 | E5123 |
| E5124 | Wonod Kinon Holdings SA | VD | E5118 | E5105 | E5124 |
| E5125 | Wonod Koval Capital SA | FR | E5119 | E5105 | E5125 |
| E5126 | Wonod Tetim Holdings Inc | US | E5120 | E5105 | E5126 |
| E5127 | Wonod Pavad Media SA | CV | E5121 | E5105 | E5127 |
| E5128 | Wonod Horal Steel SA | FR | E5122 | E5105 | E5128 |
| E5129 | Wonod Logistics SA | ES | E5123 | E5105 | E5129 |
| E5130 | Wonod Huror Retail SA | VD | E5124 | E5105 | E5130 |
| E5131 | Wonod Bunem Industries SA | ES | E5125 | E5105 | E5131 |
| E5132 | Vesol Group BV | NL |  |  | E5132 |

Query 3:

| ultimate_parent_id | count_star() |
|---|---|
| E5001 | 57 |
| E02 | 1 |
| E09 | 2 |
| E5086 | 18 |

Query 4:

| rated_id | rating_type | ccy_basis | rating | outlook | watch | action | valid_from | valid_to | action_id |
|---|---|---|---|---|---|---|---|---|---|
| E5002 | LTIDR | FC | A+ | STA |  | AS | 2025-10-16 |  | A5001 |
| E5007 | LTIDR | FC | B | STA |  | AS | 2023-11-03 |  | A5002 |
| E5008 | LTIDR | FC | BBB+ | STA |  | AS | 2023-04-15 |  | A5003 |
| E5010 | LTIDR | FC | BB- | STA |  | AS | 2023-06-05 |  | A5004 |
| E5012 | LTIDR | FC | BB | STA |  | AS | 2022-03-08 |  | A5005 |
| E5013 | LTIDR | FC | B- | NEG |  | DG | 2024-06-01 |  | A5007 |
| E5016 | LTIDR | FC | BB | STA |  | AS | 2023-01-14 |  | A5008 |
| E5017 | LTIDR | FC | A- | STA |  | AS | 2025-04-24 |  | A5009 |
| E5018 | LTIDR | FC | A | STA |  | AS | 2024-10-14 |  | A5010 |
| E5019 | LTIDR | FC | BBB+ | NEG |  | DG | 2026-03-19 |  | A5012 |
| E5020 | LTIDR | FC | BBB+ | NEG |  | DG | 2024-07-26 |  | A5014 |
| E5021 | LTIDR | FC | B | STA |  | AS | 2022-08-10 |  | A5015 |
| E5022 | LTIDR | FC | BB- | STA |  | AS | 2023-06-22 |  | A5016 |
| E5023 | LTIDR | FC | B- | NEG |  | DG | 2025-06-20 |  | A5018 |
| E5024 | LTIDR | FC | B- | STA |  | AS | 2024-05-10 |  | A5019 |
| E5025 | LTIDR | FC | BB | STA |  | AS | 2023-10-13 |  | A5020 |
| E5027 | LTIDR | FC | BBB+ | STA |  | AS | 2025-05-21 |  | A5021 |
| E5028 | LTIDR | FC | B- | STA |  | AS | 2023-04-10 |  | A5022 |
| E5029 | LTIDR | FC | BB+ | STA |  | AS | 2022-02-05 |  | A5023 |
| E5030 | LTIDR | FC | B | STA |  | AS | 2022-09-13 |  | A5024 |
| E5031 | LTIDR | FC | A+ | STA |  | AS | 2022-09-11 |  | A5025 |
| E5032 | LTIDR | FC | BBB- | STA |  | AS | 2025-12-04 |  | A5026 |
| E5033 | LTIDR | FC | A | NEG |  | DG | 2026-11-06 |  | A5028 |
| E5036 | LTIDR | FC | A- | STA |  | AS | 2023-06-09 |  | A5029 |
| E5037 | LTIDR | FC | B+ | STA |  | AS | 2025-04-05 |  | A5030 |
| E5039 | LTIDR | FC | BB- | NEG |  | DG | 2025-04-08 |  | A5032 |
| E5041 | LTIDR | FC | B- | STA |  | AS | 2023-07-26 |  | A5033 |
| E5042 | LTIDR | FC | BB | STA |  | AS | 2024-12-19 |  | A5034 |
| E5047 | LTIDR | FC | BB | STA |  | AS | 2022-07-23 |  | A5035 |
| E5048 | LTIDR | FC | B- | STA |  | AS | 2022-10-09 |  | A5036 |
| E5049 | LTIDR | FC | BBB- | STA |  | AS | 2024-09-15 |  | A5037 |
| E5050 | LTIDR | FC | BBB+ | NEG |  | DG | 2025-03-25 |  | A5039 |
| E5053 | LTIDR | FC | BBB | STA |  | AS | 2023-11-18 |  | A5040 |
| E5057 | LTIDR | FC | A | NEG |  | DG | 2025-10-04 |  | A5042 |

Query 5:

| rating | count_star() |
|---|---|
| A | 80 |
| A+ | 61 |
| A- | 74 |
| AA | 6 |
| AA- | 50 |
| B | 27 |
| B+ | 72 |
| B- | 16 |
| BB | 88 |
| BB+ | 81 |
| BB- | 61 |
| BBB | 58 |
| BBB+ | 70 |
| BBB- | 82 |
| CCC | 1 |
| F2 | 1 |
| RD | 1 |
| WD | 40 |

Run more queries, or give the final answers.
The model
<invoke name="sql">
SELECT * FROM ratings WHERE rating IN ('RD','CCC') OR valid_from>'2026-10-01' OR valid_to>'2026-10-01' ORDER BY rated_id;
```
```sql
SELECT 'Q9' q, count(DISTINCT rated_id) c FROM ratings WHERE rating_type='LTIDR' AND rating<>'WD' AND valid_from<='2026-10-01' AND (valid_to='' OR valid_to>'2026-10-01')
UNION ALL SELECT 'Q40', count(DISTINCT r.rated_id) FROM ratings r JOIN entities e ON e.entity_id=r.rated_id WHERE e.country='GB' AND r.rating_type='LTIDR' AND r.rating<>'WD' AND r.valid_from<='2026-10-01' AND (r.valid_to='' OR r.valid_to>'2026-10-01')
UNION ALL SELECT 'Q43', count(*) FROM entities WHERE country='LU'
UNION ALL SELECT 'Q48', count(DISTINCT rated_id) FROM ratings WHERE rating_type='INST' AND valid_from<='2026-10-01' AND (valid_to='' OR valid_to>'2026-10-01')
UNION ALL SELECT 'Q25', count(DISTINCT rated_id) FROM ratings WHERE rating_type='INST' AND rating IN ('AA','AA-','A+','A','A-','BBB+','BBB','BBB-') AND valid_from<='2026-10-01' AND (valid_to='' OR valid_to>'2026-10-01')
UNION ALL SELECT 'Q35', count(*) FROM entities WHERE ultimate_parent_id='E09' OR entity_id='E09'
UNION ALL SELECT 'Q36', count(*) FROM entities WHERE ultimate_parent_id='E02' OR entity_id='E02'
UNION ALL SELECT 'Q51', count(*) FROM entities WHERE ultimate_parent_id='E5001' OR entity_id='E5001'
UNION ALL SELECT 'Q52', count(*) FROM entities WHERE ultimate_parent_id='E5086' OR entity_id='E5086';
```
```sql
SELECT 'RWN' k, rated_id FROM ratings WHERE watch='RWN' AND rating_type='LTIDR' AND valid_from<='2026-10-01' AND (valid_to='' OR valid_to>'2026-10-01')
UNION ALL SELECT 'NEG', rated_id FROM ratings WHERE outlook='NEG' AND rating_type='LTIDR' AND valid_from<='2026-10-01' AND (valid_to='' OR valid_to>'2026-10-01')
UNION ALL SELECT 'DG2026', rated_id FROM ratings WHERE action='DG' AND rating_type='LTIDR' AND valid_from BETWEEN '2026-01-01' AND '2026-10-01'
ORDER BY 1,2;
```
```sql
SELECT rated_id FROM ratings WHERE rating_type='LTIDR' AND rating<>'WD' GROUP BY 1 EXCEPT SELECT rated_id FROM ratings WHERE rating_type='LTIDR' AND rating<>'WD' AND valid_from<='2026-10-01' AND (valid_to='' OR valid_to>'2026-10-01');
```
Query results
Query 1:

| q | c |
|---|---|
| Q9 | 1 |
| Q40 | 0 |
| Q43 | 1 |
| Q48 | 0 |
| Q25 | 0 |
| Q35 | 3 |
| Q36 | 2 |
| Q51 | 58 |
| Q52 | 19 |

Query 2:

| k | rated_id |
|---|---|
| DG2026 | E08 |
| DG2026 | E08 |
| DG2026 | E10 |
| DG2026 | E1034 |
| DG2026 | E1051 |
| DG2026 | E1051 |
| DG2026 | E1053 |
| DG2026 | E1057 |
| DG2026 | E1058 |
| DG2026 | E1064 |
| DG2026 | E1080 |
| DG2026 | E1093 |
| DG2026 | E1112 |
| DG2026 | E1144 |
| DG2026 | E1151 |
| DG2026 | E1159 |
| DG2026 | E1160 |
| DG2026 | E1163 |
| DG2026 | E1167 |
| DG2026 | E1169 |
| DG2026 | E1186 |
| DG2026 | E1213 |
| DG2026 | E1213 |
| DG2026 | E1228 |
| DG2026 | E1229 |
| DG2026 | E1229 |
| DG2026 | E1243 |
| DG2026 | E1255 |
| DG2026 | E1263 |
| DG2026 | E1263 |
| DG2026 | E1285 |
| DG2026 | E1290 |
| DG2026 | E1294 |
| DG2026 | E1298 |
| DG2026 | E1300 |
| DG2026 | E1300 |
| DG2026 | E1307 |
| DG2026 | E5019 |
| DG2026 | E5059 |
| DG2026 | E5097 |
| DG2026 | E5113 |
| DG2026 | E5116 |
| DG2026 | E5156 |

Query 3:

| rated_id |
|---|
| E1019 |
| E1184 |
| E5069 |
| E1218 |
| E5053 |
| E5082 |
| E1154 |
| E1181 |
| E1295 |
| E5024 |
| E5156 |
| E1231 |
| E1205 |
| E1050 |
| E1076 |
| E1298 |
| E5158 |
| E1257 |
| E1317 |
| E1193 |
| E1269 |
| E1049 |
| E1082 |
| E1245 |
| E1303 |
| E5032 |
| E1251 |
| E5084 |
| E1101 |
| E1281 |
| E1020 |
| E1276 |
| E1103 |
| E1026 |
| E1111 |
| E1025 |
| E1100 |
| E1324 |
| E1048 |
| E1056 |
| E1198 |
| E5023 |
| E5152 |
| E1085 |
| E1035 |
| E1041 |
| E1107 |
| E1129 |
| E1108 |
| E1277 |
| E1291 |
| E5050 |
| E1009 |
| E1279 |
| E1223 |
| E1183 |
| E1207 |
| E5092 |
| E1163 |
| E5025 |
(351 more rows not shown)

Run more queries, or give the final answers.
The model
The empty valid_to values are NULLs, so my earlier counts were wrong. I'm rerunning them with the right test.

```sql
WITH cur AS (SELECT * FROM ratings WHERE valid_from<='2026-10-01' AND (valid_to IS NULL OR valid_to>'2026-10-01'))
SELECT 'Q9' q, count(DISTINCT rated_id) c FROM cur WHERE rating_type='LTIDR' AND rating<>'WD'
UNION ALL SELECT 'Q40', count(DISTINCT r.rated_id) FROM cur r JOIN entities e ON e.entity_id=r.rated_id WHERE e.country='GB' AND r.rating_type='LTIDR' AND r.rating<>'WD'
UNION ALL SELECT 'Q48', count(DISTINCT rated_id) FROM cur WHERE rating_type='INST'
UNION ALL SELECT 'Q25', count(DISTINCT rated_id) FROM cur WHERE rating_type='INST' AND rating IN ('AAA','AA+','AA','AA-','A+','A','A-','BBB+','BBB','BBB-');
```
```sql
SELECT 'RWN' k, rated_id, rating, valid_from FROM ratings WHERE watch='RWN' AND valid_from<='2026-10-01' AND valid_to IS NULL
UNION ALL SELECT 'NEG', rated_id, rating, valid_from FROM ratings WHERE outlook='NEG' AND rating_type='LTIDR' AND valid_from<='2026-10-01' AND valid_to IS NULL AND rated_id IN (SELECT entity_id FROM entities)
UNION ALL SELECT 'RD/CCC', rated_id, rating, valid_from FROM ratings WHERE rating IN ('RD','CCC')
UNION ALL SELECT 'FUT', rated_id, rating, valid_from FROM ratings WHERE valid_from>'2026-10-01'
ORDER BY 1,2;
```
```sql
SELECT rated_id, rating_type, ccy_basis, rating, valid_from, valid_to, action FROM ratings WHERE rated_id IN (SELECT entity_id FROM entities WHERE ultimate_parent_id='E5132' OR entity_id='E5132') AND valid_to IS NULL AND rating_type='LTIDR' AND ccy_basis='FC' ORDER BY rated_id;
```
```sql
SELECT e.entity_id, e.name, e.country, e.parent_id FROM entities e WHERE entity_id IN ('E5145','E5133','E5132') OR name ILIKE '%Brindle%' OR name ILIKE '%Cerid Guven%' OR name ILIKE '%Cerid Telecom%';
```
```sql
SELECT * FROM ancestors WHERE entity_id IN (SELECT entity_id FROM entities WHERE name ILIKE '%Cerid Guven%' OR name ILIKE '%Cerid Telecom%' OR entity_id IN ('E5047','E5133')) ORDER BY entity_id, levels_up;
```
Query results
Query 1:

| q | c |
|---|---|
| Q9 | 377 |
| Q40 | 79 |
| Q48 | 113 |
| Q25 | 72 |

Query 2:

| k | rated_id | rating | valid_from |
|---|---|---|---|
| FUT | E5033 | A | 2026-11-06 |
| NEG | E01 | BBB | 2026-02-10 |
| NEG | E09 | A | 2026-03-01 |
| NEG | E1005 | BB | 2025-08-02 |
| NEG | E1029 | A- | 2025-08-08 |
| NEG | E1034 | BBB+ | 2026-05-02 |
| NEG | E1046 | AA- | 2025-05-28 |
| NEG | E1055 | BBB- | 2024-12-04 |
| NEG | E1056 | A+ | 2023-01-01 |
| NEG | E1059 | BB- | 2025-02-16 |
| NEG | E1064 | A- | 2026-06-03 |
| NEG | E1072 | BB- | 2026-02-07 |
| NEG | E1079 | BB+ | 2024-01-26 |
| NEG | E1080 | A- | 2026-02-14 |
| NEG | E1105 | A+ | 2024-01-13 |
| NEG | E1118 | BB+ | 2025-07-14 |
| NEG | E1158 | BBB | 2026-08-14 |
| NEG | E1160 | B | 2026-07-28 |
| NEG | E1188 | BB- | 2024-09-05 |
| NEG | E1190 | BBB | 2025-05-24 |
| NEG | E1211 | BBB- | 2024-09-26 |
| NEG | E1228 | BB+ | 2026-06-28 |
| NEG | E1248 | A- | 2026-05-02 |
| NEG | E1261 | B+ | 2024-10-13 |
| NEG | E1263 | BBB- | 2026-06-16 |
| NEG | E1271 | A- | 2025-10-15 |
| NEG | E1282 | BB+ | 2024-03-20 |
| NEG | E1294 | A+ | 2026-07-11 |
| NEG | E1300 | BBB | 2026-05-06 |
| NEG | E5013 | B- | 2024-06-01 |
| NEG | E5019 | BBB+ | 2026-03-19 |
| NEG | E5020 | BBB+ | 2024-07-26 |
| NEG | E5023 | B- | 2025-06-20 |
| NEG | E5039 | BB- | 2025-04-08 |
| NEG | E5050 | BBB+ | 2025-03-25 |
| NEG | E5057 | A | 2025-10-04 |
| NEG | E5059 | BB+ | 2026-05-25 |
| NEG | E5062 | B- | 2025-02-08 |
| NEG | E5073 | BBB- | 2024-02-01 |
| NEG | E5097 | B- | 2026-08-16 |
| NEG | E5099 | BB- | 2025-04-23 |
| NEG | E5102 | BBB- | 2024-01-14 |
| NEG | E5113 | BB- | 2026-06-21 |
| NEG | E5116 | A | 2026-05-16 |
| NEG | E5119 | A | 2025-05-20 |
| NEG | E5131 | B | 2025-11-22 |
| NEG | E5141 | BB | 2024-08-13 |
| NEG | E5156 | B- | 2026-02-16 |
| RD/CCC | E08 | RD | 2026-07-08 |
| RD/CCC | E08 | CCC | 2026-01-20 |
| RWN | E06 | A- | 2026-09-03 |
| RWN | E1006 | AA | 2026-06-17 |
| RWN | E1013 | BB- | 2025-07-09 |
| RWN | E1019 | BBB- | 2024-03-20 |
| RWN | E1037 | A | 2022-05-07 |
| RWN | E1039 | A | 2025-12-09 |
| RWN | E1059 | BB- | 2026-02-23 |
| RWN | E1061 | A | 2025-06-06 |
| RWN | E1066 | A- | 2026-05-03 |
| RWN | E1088 | B+ | 2024-01-16 |
(22 more rows not shown)

Query 3:

| rated_id | rating_type | ccy_basis | rating | valid_from | valid_to | action |
|---|---|---|---|---|---|---|
| E5132 | LTIDR | FC | BB+ | 2023-12-02 |  | AS |
| E5133 | LTIDR | FC | BBB- | 2022-01-15 |  | AS |
| E5136 | LTIDR | FC | BBB- | 2024-04-07 |  | AS |
| E5140 | LTIDR | FC | A+ | 2022-04-03 |  | AS |
| E5141 | LTIDR | FC | BB | 2024-08-13 |  | DG |
| E5143 | LTIDR | FC | A | 2025-11-02 |  | AS |
| E5144 | LTIDR | FC | BB- | 2023-11-05 |  | AS |

Query 4:

| entity_id | name | country | parent_id |
|---|---|---|---|
| E5011 | Cerid Guven Energy SA | VD | E5005 |
| E5013 | Cerid Telecom SA | ES | E5006 |
| E5132 | Vesol Group BV | NL |  |
| E5133 | Vesol Foods plc | GB | E5132 |
| E5145 | Geren Group SA | VD |  |

Query 5:

| entity_id | ancestor_id | levels_up |
|---|---|---|
| E5011 | E5005 | 1 |
| E5011 | E5002 | 2 |
| E5011 | E5001 | 3 |
| E5013 | E5006 | 1 |
| E5013 | E5002 | 2 |
| E5013 | E5001 | 3 |
| E5047 | E5035 | 1 |
| E5047 | E5023 | 2 |
| E5047 | E5011 | 3 |
| E5047 | E5005 | 4 |
| E5047 | E5002 | 5 |
| E5047 | E5001 | 6 |
| E5133 | E5132 | 1 |

Run more queries, or give the final answers.
The model
```sql
SELECT 'RWN' k, rated_id FROM ratings WHERE watch='RWN' AND valid_from<='2026-10-01' AND valid_to IS NULL AND rated_id IN (SELECT entity_id FROM entities) ORDER BY 2;
```
```sql
WITH cur AS (SELECT * FROM ratings WHERE valid_from<='2026-10-01' AND (valid_to IS NULL OR valid_to>'2026-10-01'))
SELECT 'Q21' q, rated_id v FROM (SELECT DISTINCT rated_id FROM ratings WHERE rating_type='LTIDR' AND rating<>'WD' AND valid_from<='2026-10-01' EXCEPT SELECT rated_id FROM cur WHERE rating_type='LTIDR' AND rating<>'WD')
UNION ALL SELECT 'Q30', e.entity_id FROM cur r JOIN entities e ON e.entity_id=r.rated_id JOIN ceilings c ON c.country=e.country WHERE r.rating_type='LTIDR' AND r.ccy_basis='FC' AND r.rating=c.ceiling
UNION ALL SELECT 'Q31', e.entity_id||':'||r.rating FROM cur r JOIN entities e ON e.entity_id=r.rated_id JOIN ceilings c ON c.country=e.country WHERE r.rating_type='LTIDR' AND r.ccy_basis='FC' AND e.entity_type<>'SOV'
UNION ALL SELECT 'Q55', count(DISTINCT r.rated_id)::VARCHAR FROM cur r JOIN ancestors a ON a.entity_id=r.rated_id JOIN entities p ON p.entity_id=a.ancestor_id WHERE r.rating_type='LTIDR' AND r.rating<>'WD' AND p.country='VD'
UNION ALL SELECT 'Q58', i.instrument_id||':'||i.guarantor_id FROM instruments i JOIN entities g ON g.entity_id=i.guarantor_id JOIN entities s ON s.entity_id=i.issuer_id WHERE i.guarantor_id<>'' AND coalesce(nullif(g.ultimate_parent_id,''),g.entity_id)<>coalesce(nullif(s.ultimate_parent_id,''),s.entity_id)
UNION ALL SELECT 'Q59', count(*)::VARCHAR FROM ancestors WHERE ancestor_id='E5001' AND levels_up=3
UNION ALL SELECT 'Q61', count(DISTINCT r.rated_id)::VARCHAR FROM cur r JOIN entities e ON e.entity_id=r.rated_id WHERE r.rating_type='LTIDR' AND r.ccy_basis='FC' AND r.rating IN ('BB+','BB','BB-','B+','B','B-','CCC','RD') AND (e.ultimate_parent_id='E5001' OR e.entity_id='E5001')
UNION ALL SELECT 'Q37', lei||':'||string_agg(entity_id,',') FROM entities WHERE lei<>'' GROUP BY lei HAVING count(*)>1;
```
Query results
Query 1:

| k | rated_id |
|---|---|
| RWN | E06 |
| RWN | E1006 |
| RWN | E1013 |
| RWN | E1019 |
| RWN | E1037 |
| RWN | E1039 |
| RWN | E1059 |
| RWN | E1061 |
| RWN | E1066 |
| RWN | E1088 |
| RWN | E1098 |
| RWN | E1099 |
| RWN | E1109 |
| RWN | E1126 |
| RWN | E1132 |
| RWN | E1133 |
| RWN | E1146 |
| RWN | E1168 |
| RWN | E1181 |
| RWN | E1194 |
| RWN | E1203 |
| RWN | E1209 |
| RWN | E1238 |
| RWN | E1242 |
| RWN | E1260 |
| RWN | E1264 |
| RWN | E1266 |
| RWN | E1267 |
| RWN | E1297 |
| RWN | E1314 |
| RWN | E1317 |
| RWN | E1323 |

Query 2:

| q | v |
|---|---|
| Q21 | E1244 |
| Q21 | E1316 |
| Q21 | E1007 |
| Q21 | E1159 |
| Q21 | E1253 |
| Q21 | E1308 |
| Q21 | E1032 |
| Q21 | E1155 |
| Q21 | E1057 |
| Q21 | E1320 |
| Q21 | E1206 |
| Q21 | E1219 |
| Q21 | E1166 |
| Q21 | E07 |
| Q21 | E1021 |
| Q21 | E1048 |
| Q21 | E1084 |
| Q21 | E1062 |
| Q21 | E1041 |
| Q21 | E1107 |
| Q21 | E1138 |
| Q21 | E1063 |
| Q21 | E1140 |
| Q21 | E1076 |
| Q21 | E1001 |
| Q21 | E1172 |
| Q21 | E1124 |
| Q21 | E1277 |
| Q21 | E1218 |
| Q21 | E1200 |
| Q21 | E1234 |
| Q21 | E1225 |
| Q21 | E1233 |
| Q21 | E1121 |
| Q21 | E1205 |
| Q30 | E05 |
| Q30 | E15 |
| Q30 | E1028 |
| Q30 | E1039 |
| Q30 | E1101 |
| Q30 | E1126 |
| Q30 | E1194 |
| Q30 | E1236 |
| Q30 | E5012 |
| Q30 | E5047 |
| Q30 | E5091 |
| Q30 | E5116 |
| Q30 | E5124 |
| Q31 | E05:BB |
| Q31 | E15:A |
| Q31 | E1019:BB+ |
| Q31 | E1028:BB |
| Q31 | E1039:A |
| Q31 | E1059:BB- |
| Q31 | E1071:B+ |
| Q31 | E1096:BBB |
| Q31 | E1101:BB |
| Q31 | E1106:B+ |
| Q31 | E1126:BB |
| Q31 | E1136:A- |
(30 more rows not shown)

Run more queries, or give the final answers.
The model
<invoke name="sql">
SELECT 1;
</invoke>
```sql
WITH cur AS (SELECT * FROM ratings WHERE valid_from<='2026-10-01' AND (valid_to IS NULL OR valid_to>'2026-10-01'))
SELECT 'Q55' q, count(DISTINCT r.rated_id)::VARCHAR v FROM cur r JOIN ancestors a ON a.entity_id=r.rated_id JOIN entities p ON p.entity_id=a.ancestor_id WHERE r.rating_type='LTIDR' AND r.rating<>'WD' AND p.country='VD'
UNION ALL SELECT 'Q58', i.instrument_id||':'||i.guarantor_id||'>'||i.issuer_id FROM instruments i JOIN entities g ON g.entity_id=i.guarantor_id JOIN entities s ON s.entity_id=i.issuer_id WHERE i.guarantor_id IS NOT NULL AND i.guarantor_id<>'' AND coalesce(nullif(g.ultimate_parent_id,''),g.entity_id)<>coalesce(nullif(s.ultimate_parent_id,''),s.entity_id)
UNION ALL SELECT 'Q59', count(*)::VARCHAR FROM ancestors WHERE ancestor_id='E5001' AND levels_up=3
UNION ALL SELECT 'Q61', count(DISTINCT r.rated_id)::VARCHAR FROM cur r JOIN entities e ON e.entity_id=r.rated_id WHERE r.rating_type='LTIDR' AND r.ccy_basis='FC' AND r.rating IN ('BB+','BB','BB-','B+','B','B-','CCC','CC','C','RD','D') AND (e.ultimate_parent_id='E5001' OR e.entity_id='E5001')
UNION ALL SELECT 'Q8', rated_id||':'||rating||':'||coalesce(valid_to,'null') FROM ratings WHERE rating IN ('RD','CCC')
UNION ALL SELECT 'Q31', count(*)::VARCHAR FROM cur r JOIN entities e ON e.entity_id=r.rated_id JOIN ceilings c ON c.country=e.country WHERE r.rating_type='LTIDR' AND r.ccy_basis='FC' AND e.entity_type<>'SOV' AND ((c.country='VD' AND r.rating IN ('AA','AA-','A+','A','A-','BBB+','BBB','BBB-','BB+')) OR (c.country='CV' AND r.rating IN ('AA','AA-','A+')));
```
Query results
Query 1:

| q | v |
|---|---|
| Q55 | 31 |
| Q58 | I5007:E5145>E5133 |
| Q59 | 12 |
| Q61 | 19 |
| Q8 | E08:CCC:2026-07-08 |
| Q8 | E08:RD:null |
| Q31 | 0 |

Query 2:

| 1 |
|---|
| 1 |

This was the last round: give the final answers now, with no more queries.
The model
**Q1.** A-. E01's FC LTIDR was A- from 2024-03-12 to 2025-06-20 (A01).

**Q2.** No. E01's only 2026 action is an affirmation with a Negative outlook on 2026-02-10 (A03), and the rating stayed BBB.

**Q3.** No. The 2031 note I02 has been rated BB+ since 2025-06-20 (A07), which is below investment grade.

**Q4.** Positive. E02's current rating is A with a POS outlook (A09).

**Q5.** The holder takes E02's credit risk (guarantor of I03). It is rated A (I03 and E02 both A).

**Q6.** The data supports this explanation. The VD Country Ceiling is BB, effective 2025-04-01. E05's FC rating is BB (A14), capped at the ceiling, while its LC rating is BBB- (A13).

**Q7.** 37 issuers had a downgrade (DG) action from 2026-01-01 to 2026-10-01. The 2026-11-06 downgrade of E5033 falls after the cut-off and is excluded. The list is in the JSON.

**Q8.** E08. It is rated RD (valid from 2026-07-08, still in force), after CCC on 2026-01-20.

**Q9.** 377 distinct entities held a non-withdrawn LTIDR on 2026-10-01. This count includes any sovereigns with a rating in force, as the data doesn't separate them.

**Q10.** Depends. E05 is BB on FC (A14, not investment grade) but BBB- on LC (A13, investment grade).

**Q11.** BBB+. E14 was downgraded from A- to BBB+ on 2024-09-30 (A36), and the rating ran to 2025-11-20.

**Q12.** A-. This was E14's rating from 2023-01-15 (A34).

**Q13.** 1. Only A36 is a downgrade for E14.

**Q14.** None. E12's first rating (A30) starts 2024-02-01.

**Q15.** A-. E10's rating was A- (A26) until 2026-04-15.

**Q16.** No. E14 was BBB+ on 2025-01-01 and is BBB+ now (A33). Only the watch and outlook changed.

**Q17.** No. E06 went on Rating Watch Negative on 2026-09-03 (A17), but its rating stayed A-.

**Q18.** 32 issuers were on Rating Watch Negative. The list is in the JSON.

**Q19.** 47 issuers had a Negative outlook. The list is in the JSON. E1059 has both a Negative-outlook row and an RWN row open, so its inclusion is uncertain.

**Q20.** No. E07's rating was withdrawn (WD, A19), which is not a default.

**Q21.** 35 entities lost their issuer rating, including E07. The list is in the JSON.

**Q22.** E08, the only entity with an RD or CCC rating.

**Q23.** F2 (A04).

**Q24.** Yes. E01's issuer rating is BBB (A03).

**Q25.** 72 instruments held an investment-grade rating.

**Q26.** A+ (A40).

**Q27.** A- (I06, A42).

**Q28.** BBB+ (A38).

**Q29.** None. No LTIDR is recorded for VD.

**Q30.** 13 entities sit exactly at their country's ceiling (BB for VD, A for CV). The list is in the JSON.

**Q31.** No. No non-sovereign has an FC rating above its country's ceiling.

**Q32.** E09, the top of E11's chain via E10.

**Q33.** The holder takes E10's credit risk (guarantor of I05). It is rated BBB+ (I05 A29, E10 A27).

**Q34.** No. E12 has no parent and is not in E09's group (E10 is).

**Q35.** 3: E09, E10 and E11.

**Q36.** 2: E02 and E04.

**Q37.** 497. The entities table is already merged, with one row per distinct legal entity.

**Q38.** No. E06 and E13 are separate entities with different countries and LEIs.

**Q39.** A (A09).

**Q40.** 79 GB-domiciled issuers.

**Q41.** None. No entity named Brindle Capital exists in the data.

**Q42.** LU (E10).

**Q43.** 1 (E10).

**Q44.** Yes. I07 has local_currency = yes and is denominated in XVD.

**Q45.** No. The ceiling applies to FC ratings, and I07 is a local-currency note rated BBB- (A45).

**Q46.** No. There is no LTIDR for E11.

**Q47.** None. I08 has no rating records.

**Q48.** 113 instruments held a rating.

**Q49.** E5001.

**Q50.** 6 levels, from the ancestors table.

**Q51.** 58.

**Q52.** 19.

**Q53.** No. E5062 sits under E5059 (Belir Group) and E5086 is a separate top entity.

**Q54.** E5106, E5124 and E5130.

**Q55.** 31 rated entities have a VD-domiciled ancestor.

**Q56.** BB-, held by E5144.

**Q57.** E5002, two levels above both E5011 and E5013.

**Q58.** E5145, guarantor of I5007 issued by E5133.

**Q59.** 12.

**Q60.** The holder takes E5145's credit risk. It is not in the same group as the issuer E5133 (Vesol group).

**Q61.** 19.

```json
{
"Q1":{"rating":"A-"},
"Q2":{"downgraded":"no"},
"Q3":{"investment_grade":"no","rating":"BB+"},
"Q4":{"outlook":"POS"},
"Q5":{"risk_of":"E02","rating":"A"},
"Q7":{"issuers":["E08","E10","E1034","E1051","E1053","E1057","E1058","E1064","E1080","E1093","E1112","E1144","E1151","E1159","E1160","E1163","E1167","E1169","E1186","E1213","E1228","E1229","E1243","E1255","E1263","E1285","E1290","E1294","E1298","E1300","E1307","E5019","E5059","E5097","E5113","E5116","E5156"]},
"Q8":{"entities":["E08"]},
"Q9":{"count":377},
"Q10":{"investment_grade":"depends"},
"Q11":{"rating":"BBB+"},
"Q12":{"rating":"A-"},
"Q13":{"count":1},
"Q14":{"rating":"none"},
"Q15":{"rating":"A-"},
"Q16":{"changed":"no"},
"Q17":{"downgraded":"no"},
"Q18":{"issuers":["E06","E1006","E1013","E1019","E1037","E1039","E1059","E1061","E1066","E1088","E1098","E1099","E1109","E1126","E1132","E1133","E1146","E1168","E1181","E1194","E1203","E1209","E1238","E1242","E1260","E1264","E1266","E1267","E1297","E1314","E1317","E1323"]},
"Q19":{"issuers":["E01","E09","E1005","E1029","E1034","E1046","E1055","E1056","E1059","E1064","E1072","E1079","E1080","E1105","E1118","E1158","E1160","E1188","E1190","E1211","E1228","E1248","E1261","E1263","E1271","E1282","E1294","E1300","E5013","E5019","E5020","E5023","E5039","E5050","E5057","E5059","E5062","E5073","E5097","E5099","E5102","E5113","E5116","E5119","E5131","E5141","E5156"]},
"Q20":{"in_default":"no"},
"Q21":{"entities":["E1244","E1316","E1007","E1159","E1253","E1308","E1032","E1155","E1057","E1320","E1206","E1219","E1166","E07","E1021","E1048","E1084","E1062","E1041","E1107","E1138","E1063","E1140","E1076","E1001","E1172","E1124","E1277","E1218","E1200","E1234","E1225","E1233","E1121","E1205"]},
"Q22":{"entities":["E08"]},
"Q23":{"rating":"F2"},
"Q24":{"investment_grade":"yes"},
"Q25":{"count":72},
"Q26":{"rating":"A+"},
"Q27":{"rating":"A-"},
"Q28":{"rating":"BBB+"},
"Q29":{"rating":"none"},
"Q30":{"entities":["E05","E15","E1028","E1039","E1101","E1126","E1194","E1236","E5012","E5047","E5091","E5116","E5124"]},
"Q31":{"any":"no"},
"Q32":{"parent":"E09"},
"Q33":{"risk_of":"E10","rating":"BBB+"},
"Q34":{"same_group":"no"},
"Q35":{"count":3},
"Q36":{"count":2},
"Q37":{"count":497},
"Q38":{"same":"no"},
"Q39":{"rating":"A"},
"Q40":{"count":79},
"Q41":{"rating":"none"},
"Q42":{"country":"LU"},
"Q43":{"count":1},
"Q44":{"local_currency":"yes"},
"Q45":{"above_ceiling":"no"},
"Q46":{"issuer_rating":"no"},
"Q47":{"rating":"none"},
"Q48":{"count":113},
"Q49":{"parent":"E5001"},
"Q50":{"count":6},
"Q51":{"count":58},
"Q52":{"count":19},
"Q53":{"same_group":"no"},
"Q54":{"entities":["E5106","E5124","E5130"]},
"Q55":{"count":31},
"Q56":{"rating":"BB-"},
"Q57":{"entity":"E5002"},
"Q58":{"entities":["E5145"]},
"Q59":{"count":12},
"Q60":{"risk_of":"E5145","same_group":"no"},
"Q61":{"count":19}
}
```