D3 sql+executed, run 5: the query session

← back to the run

22 queries1 failed6 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` (331 rows): entity_id, name, lei, country, entity_type, parent_id, ultimate_parent_id, record_ids
- `instruments` (115 rows): instrument_id, description, issuer_id, guarantor_id, credit_risk_of, seniority, currency, local_currency, maturity
- `ratings` (743 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` (55 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)

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?
The model
I'll start by exploring the tables.

```sql
SELECT * FROM entities ORDER BY entity_id LIMIT 400;
```

```sql
SELECT * FROM instruments ORDER BY instrument_id;
```

```sql
SELECT * FROM ceilings;
```

```sql
SELECT * FROM ancestors ORDER BY entity_id;
```

```sql
SELECT rating_type, ccy_basis, count(*) FROM ratings GROUP BY ALL ORDER BY ALL;
```
Query results
Query 1:

| entity_id | name | lei | country | entity_type | parent_id | ultimate_parent_id | record_ids |
|---|---|---|---|---|---|---|---|
| CV | Republic of Corvenia |  | CV | SOV |  |  | CV |
| E01 | Kestrel Energy plc | 7245002OOPBG04092E43 | GB | CORP |  |  | E01 |
| E02 | Northwind Holdings plc | 213800PHEIYNJMHTDV74 | GB | CORP |  |  | E02 E03 |
| E04 | Northwind Finance BV | 213800LA5RYJLGXV2T85 | NL | FINSUB | E02 | E02 | E04 |
| E05 | Valdoria Telecom SA | 391200LESH03LMOY2U61 | VD | CORP |  |  | E05 |
| E06 | Orrin Bank AG | 549300AMVE3VRVG7HK43 | DE | BANK |  |  | E06 |
| E07 | Pellam Retail Ltd | 969500B6IUACELPI2291 | GB | CORP |  |  | E07 |
| E08 | Saxby Shipping SA | 969500KOTZ1JFIZSG796 | GR | CORP |  |  | E08 |
| E09 | Halden Group plc | 815600ASM9EHDG931T89 | GB | CORP |  |  | E09 |
| E10 | Halden Bank AG | 391200QYPVFF2O9K2039 | LU | BANK | E09 | E09 | E10 E17 |
| E1001 | Tunod Steel SA | 3912003R00FP6CNV6210 | FR | CORP |  |  | E1001 E1002 |
| E1003 | Rilol Telecom plc | 3912009W4J483WB8PZ97 | GB | BANK |  |  | E1003 |
| E1004 | Munem Retail SA | 969500IBYK0X2ZT52780 | ES | CORP |  |  | E1004 |
| E1005 | Setan Airlines Inc | 815600JRN7AOE36KFR35 | US | CORP |  |  | E1005 |
| E1006 | Soson Airlines Inc | 213800WSVEOAQ5HD4C43 | US | CORP | E1005 | E1005 | E1006 |
| E1007 | Golod Property plc | 815600N2UAHQREHHWF76 | GB | BANK |  |  | E1007 |
| E1008 | Sotil Retail plc | 213800RPNJ2OSQ387M40 | GB | CORP |  |  | E1008 |
| E1009 | Malam Chemicals Inc | 3912006EIY6TU9NVSC86 | US | CORP |  |  | E1009 |
| E1010 | Buvir Industries Inc | 3912004R2GZJL49URX69 | US | CORP |  |  | E1010 |
| E1011 | Falom Media Inc | 549300XX6U9N4Y7KPH74 | US | BANK |  |  | E1011 |
| E1012 | Posad Industries SA | 9695002JIQI5QYDN0G98 | FR | CORP |  |  | E1012 |
| E1013 | Pisol Pharma BV | 969500U072SAPPW32N81 | NL | BANK | E1004 | E1004 | E1013 |
| E1014 | Toral Utilities BV | 391200J700D8T2H18W16 | NL | CORP |  |  | E1014 |
| E1015 | Civen Steel Inc | 815600JSNIJ4UFCBF662 | US | CORP |  |  | E1015 |
| E1016 | Ponar Telecom SA | 5493008DQ96XI37KZG24 | ES | BANK |  |  | E1016 |
| E1017 | Nisid Steel SA | 391200K600X7LWZTTM85 | FR | BANK |  |  | E1017 |
| E1018 | Tosem Mining Inc | 549300SEMGL6OXLWHQ59 | US | CORP |  |  | E1018 |
| E1019 | Losol Mining SA | 391200GSFO0F68KKUC67 | CV | CORP |  |  | E1019 |
| E1020 | Finel Media AG | 549300FCSHHELSCZX562 | DE | CORP |  |  | E1020 |
| E1021 | Niner Pharma plc | 391200KLG6G4KVIMIU52 | GB | CORP |  |  | E1021 E1022 |
| E1023 | Heled Water plc | 3912006FHXTH5V6WNK07 | GB | CORP |  |  | E1023 |
| E1024 | Susin Shipping BV | 3912005J04HB7X0GTN24 | NL | CORP |  |  | E1024 |
| E1025 | Tulol Shipping SA | 2138007MIV2OS05PET94 | ES | BANK |  |  | E1025 |
| E1026 | Vunam Water BV | 969500C8XYHXZBFMUO41 | NL | CORP |  |  | E1026 |
| E1027 | Tesad Media Inc | 969500T86HNH5S920X18 | US | CORP |  |  | E1027 |
| E1028 | Mutir Retail SA | 213800TJ32NARU0BI982 | VD | CORP |  |  | E1028 |
| E1029 | Leson Telecom Inc | 8156008DPX4I9DNKWN26 | US | BANK |  |  | E1029 E1030 |
| E1031 | Kuvir Logistics SA | 969500GRHP48SQNEWH44 | ES | CORP |  |  | E1031 |
| E1032 | Helom Chemicals BV | 2138006H9XCYN2P1K228 | NL | BANK |  |  | E1032 |
| E1033 | Kunid Pharma SA | 213800Q84PS4FTJJB947 | ES | CORP | E1004 | E1004 | E1033 |
| E1034 | Tanad Capital SpA | 815600KLV84WAQGPSX27 | IT | CORP |  |  | E1034 |
| E1035 | Kavod Utilities AG | 724500YHN51API4SE179 | DE | CORP |  |  | E1035 |
| E1036 | Lilor Retail AG | 9695000N72OQ0Q07IW61 | DE | CORP |  |  | E1036 |
| E1037 | Natil Retail SA | 391200OBAXI8590VQN12 | FR | CORP |  |  | E1037 |
| E1038 | Lanon Telecom BV | 549300EZ4HXP0L5RAZ01 | NL | CORP |  |  | E1038 |
| E1039 | Pulor Airlines SA | 969500HA9D5I7F73PW83 | CV | BANK |  |  | E1039 |
| E1040 | Dorid Mining AG | 549300SPMD9MEMFWMR12 | DE | CORP |  |  | E1040 |
| E1041 | Hiral Steel SA | 549300JU1O5MP1HSKQ01 | ES | CORP |  |  | E1041 |
| E1042 | Rerod Steel BV | 391200LC6V921W096L49 | NL | CORP |  |  | E1042 |
| E1043 | Vitom Property plc | 5493007IVTPIWJZLFF29 | GB | CORP |  |  | E1043 |
| E1044 | Hesid Telecom Inc | 3912003Y7VZHUGN50755 | US | BANK |  |  | E1044 |
| E1045 | Nesid Logistics Inc | 96950029VB162U3K1976 | US | BANK |  |  | E1045 |
| E1046 | Ditin Shipping Inc | 549300ZM08IADSAK3L87 | US | BANK | E1026 | E1026 | E1046 |
| E1047 | Vaved Pharma plc | 391200WGA8OE30KZUD08 | GB | CORP | E1020 | E1020 | E1047 |
| E1048 | Lised Pharma AG | 9695000T21G05UQMGF10 | DE | CORP |  |  | E1048 |
| E1049 | Paser Utilities plc | 391200R2EH7FELZFOV27 | GB | CORP |  |  | E1049 |
| E1050 | Sunar Holdings AG | 969500YF1ZXQV9ONT388 | DE | CORP |  |  | E1050 |
| E1051 | Kenar Water SA | 724500WO4TZY2027IZ62 | GR | CORP |  |  | E1051 |
| E1052 | Witad Steel SA | 213800ENVP6736MREW83 | FR | CORP |  |  | E1052 |
| E1053 | Soter Water SA | 5493001E7O9QDD98PV36 | ES | CORP |  |  | E1053 |
(271 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 |
| 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 |
(55 more rows not shown)

Query 3:

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

Query 4:

| entity_id | ancestor_id | levels_up |
|---|---|---|
| E04 | E02 | 1 |
| E10 | E09 | 1 |
| E1006 | E1005 | 1 |
| E1013 | E1004 | 1 |
| E1033 | E1004 | 1 |
| E1046 | E1026 | 1 |
| E1047 | E1020 | 1 |
| E1059 | E1015 | 1 |
| E1066 | E1004 | 1 |
| E1075 | E1071 | 1 |
| E1089 | E1078 | 1 |
| E1095 | E1027 | 1 |
| E1098 | E1006 | 1 |
| E1098 | E1005 | 2 |
| E11 | E09 | 2 |
| E11 | E10 | 1 |
| E1101 | E1083 | 1 |
| E1110 | E1007 | 1 |
| E1114 | E1063 | 1 |
| E1149 | E1013 | 1 |
| E1149 | E1004 | 2 |
| E1174 | E1073 | 1 |
| E1177 | E1010 | 1 |
| E1179 | E1162 | 1 |
| E1183 | E1025 | 1 |
| E1191 | E1177 | 1 |
| E1191 | E1010 | 2 |
| E1197 | E1066 | 1 |
| E1197 | E1004 | 2 |
| E1215 | E1063 | 1 |
| E1228 | E1023 | 1 |
| E1233 | E1198 | 1 |
| E1248 | E1107 | 1 |
| E1271 | E1071 | 1 |
| E1273 | E1074 | 1 |
| E1275 | E1189 | 1 |
| E1276 | E1074 | 1 |
| E1292 | E1061 | 1 |
| E1293 | E1166 | 1 |
| E1315 | E1278 | 1 |
| E1325 | E1084 | 1 |
| E1326 | E1052 | 1 |
| E1327 | E1119 | 1 |
| E1328 | E1244 | 1 |
| E1329 | E1069 | 1 |
| E1330 | E1021 | 1 |
| E1331 | E1025 | 1 |
| E1332 | E1068 | 1 |
| E1333 | E1082 | 1 |
| E1334 | E1260 | 1 |
| E1335 | E1234 | 1 |
| E1336 | E1176 | 1 |
| E1337 | E1038 | 1 |
| E1338 | E1073 | 1 |
| E1339 | E1241 | 1 |

Query 5:

| rating_type | ccy_basis | count_star() |
|---|---|---|
| INST |  | 110 |
| LTIDR | FC | 598 |
| LTIDR | LC | 34 |
| STIDR | FC | 1 |

Run more queries, or give the final answers.
The model
```sql
SELECT * FROM entities WHERE entity_id NOT LIKE 'E1%' OR name ILIKE ANY ('%Marlow%','%Brindle%','%Halden%','%Corvenia%','%Valdoria%','%Orrin%','%Northwind%','%Pellam%') ORDER BY entity_id;
```

```sql
SELECT * FROM instruments WHERE instrument_id NOT LIKE 'I1%' OR issuer_id NOT LIKE 'E1%' ORDER BY instrument_id;
```

```sql
SELECT r.* FROM ratings r WHERE rated_id NOT LIKE 'E1%' AND rated_id NOT LIKE 'I1%' ORDER BY rated_id, rating_type, ccy_basis, valid_from;
```

```sql
SELECT rated_id, count(*) FROM ratings WHERE rating_type='STIDR' OR rating ILIKE '%D%' OR rating IN ('RD','SD','C') GROUP BY ALL;
```
Query results
Query 1 failed: Parser Error: syntax error at or near ","

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 |

Query 3:

| 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 |
| E08 | LTIDR | FC | B | STA |  | AS | 2024-06-01 | 2026-01-20 | A20 |
| E08 | LTIDR | FC | CCC |  |  | DG | 2026-01-20 | 2026-07-08 | A21 |
| E08 | LTIDR | FC | RD |  |  | DG | 2026-07-08 |  | A22 |
| E09 | LTIDR | FC | A | STA |  | AS | 2023-05-01 | 2026-03-01 | A24 |
| E09 | LTIDR | FC | A | NEG |  | AF | 2026-03-01 |  | A25 |
| 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 |

Query 4:

| rated_id | count_star() |
|---|---|
| E1076 | 1 |
| E1205 | 1 |
| E1218 | 1 |
| E1303 | 1 |
| E1041 | 1 |
| E1048 | 1 |
| E1107 | 1 |
| E1115 | 1 |
| E1159 | 1 |
| E1200 | 1 |
| E1206 | 1 |
| E1234 | 1 |
| E1233 | 1 |
| E1320 | 1 |
| E1063 | 1 |
| E1140 | 1 |
| E1277 | 1 |
| E1279 | 1 |
| E1084 | 1 |
| E1007 | 1 |
| E1121 | 1 |
| E1166 | 1 |
| E08 | 1 |
| E1057 | 1 |
| E1172 | 1 |
| E01 | 1 |
| E1106 | 1 |
| E1219 | 1 |
| E07 | 1 |
| E1124 | 1 |
| E1032 | 1 |
| E1158 | 1 |
| E1225 | 1 |
| E1253 | 1 |
| E1308 | 1 |
| E1155 | 1 |
| E1001 | 1 |
| E1244 | 1 |
| E1316 | 1 |
| E1021 | 1 |
| E1062 | 1 |
| E1138 | 1 |

Run more queries, or give the final answers.
The model
<parameter name="sql">SELECT * FROM entities WHERE entity_id NOT LIKE 'E1___' AND entity_id NOT LIKE 'E1__' OR name ILIKE '%Marlow%' OR name ILIKE '%Brindle%' OR name ILIKE '%Halden%' OR name ILIKE '%Corvenia%' OR name ILIKE '%Valdoria%' OR name ILIKE '%Orrin%' OR name ILIKE '%Northwind%' OR name ILIKE '%Pellam%' ORDER BY entity_id;</parameter>
```

```sql
SELECT * FROM ratings WHERE rated_id IN ('E10','E11','E12','E13','E14','E15','E16','E17','E18','E19','E20','I09','I10','I11') ORDER BY rated_id, valid_from;
```

```sql
SELECT * FROM instruments WHERE instrument_id NOT LIKE 'I1___' ORDER BY instrument_id;
```

```sql
SELECT * FROM ratings WHERE rating IN ('D','RD','SD','C','WD') OR watch<>'' ORDER BY rated_id;
```


<parameter name="sql">SELECT 1;</parameter>
```
Query results
Query 1:

| rated_id | rating_type | ccy_basis | rating | outlook | watch | action | valid_from | valid_to | action_id |
|---|---|---|---|---|---|---|---|---|---|
| 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 |

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 |

Query 3:

| rated_id | rating_type | ccy_basis | rating | outlook | watch | action | valid_from | valid_to | action_id |
|---|---|---|---|---|---|---|---|---|---|
| E06 | LTIDR | FC | A- |  | RWN | RW | 2026-09-03 |  | A17 |
| E07 | LTIDR | FC | WD |  |  | WD | 2026-05-12 |  | A19 |
| E08 | LTIDR | FC | RD |  |  | DG | 2026-07-08 |  | A22 |
| E1001 | LTIDR | FC | WD |  |  | WD | 2025-07-20 |  | A1002 |
| E1006 | LTIDR | FC | AA |  | RWN | RW | 2026-06-17 |  | A1010 |
| E1007 | LTIDR | FC | WD |  |  | WD | 2026-06-27 |  | A1013 |
| E1012 | LTIDR | FC | BB |  | RWN | RW | 2025-04-03 | 2026-02-06 | A1022 |
| E1013 | LTIDR | FC | BB- |  | RWN | RW | 2025-07-09 |  | A1026 |
| E1019 | LTIDR | LC | BBB- |  | RWN | RW | 2024-02-08 | 2024-03-20 | A1041 |
| E1019 | LTIDR | LC | BBB- |  | RWN | RW | 2024-03-20 |  | A1042 |
| E1021 | LTIDR | FC | WD |  |  | WD | 2025-11-08 |  | A1046 |
| E1032 | LTIDR | FC | WD |  |  | WD | 2026-09-15 |  | A1067 |
| E1037 | LTIDR | FC | A |  | RWN | RW | 2022-05-07 |  | A1076 |
| E1039 | LTIDR | FC | A |  | RWN | RW | 2025-12-09 |  | A1080 |
| E1041 | LTIDR | FC | A+ |  | RWN | RW | 2023-04-08 | 2024-04-09 | A1084 |
| E1041 | LTIDR | FC | WD |  |  | WD | 2024-04-09 |  | A1085 |
| E1048 | LTIDR | FC | WD |  |  | WD | 2023-04-15 |  | A1095 |
| E1057 | LTIDR | FC | WD |  |  | WD | 2026-09-19 |  | A1124 |
| E1059 | LTIDR | LC | BB- |  | RWN | RW | 2026-02-23 |  | A1132 |
| E1061 | LTIDR | FC | A |  | RWN | RW | 2025-06-06 |  | A1134 |
| E1062 | LTIDR | FC | WD |  |  | WD | 2025-03-28 |  | A1136 |
| E1063 | LTIDR | FC | WD |  |  | WD | 2025-01-12 |  | A1138 |
| E1066 | LTIDR | FC | A- |  | RWN | RW | 2026-05-03 |  | A1145 |
| E1076 | LTIDR | FC | WD |  |  | WD | 2024-04-28 |  | A1161 |
| E1084 | LTIDR | FC | WD |  |  | WD | 2025-08-02 |  | A1180 |
| E1088 | LTIDR | FC | B+ |  | RWN | RW | 2024-01-16 |  | A1190 |
| E1091 | LTIDR | FC | A |  | RWN | RW | 2025-08-19 | 2025-08-27 | A1199 |
| E1095 | LTIDR | FC | A- |  | RWN | RW | 2025-02-18 | 2025-11-08 | A1206 |
| E1098 | LTIDR | FC | BBB- |  | RWN | RW | 2026-03-05 | 2026-04-28 | A1212 |
| E1098 | LTIDR | FC | BBB- |  | RWN | RW | 2026-04-28 |  | A1211 |
| E1099 | LTIDR | FC | BB+ |  | RWN | RW | 2023-11-05 |  | A1214 |
| E1106 | LTIDR | LC | WD |  |  | WD | 2025-08-10 |  | A1230 |
| E1107 | LTIDR | FC | WD |  |  | WD | 2024-10-16 |  | A1233 |
| E1109 | LTIDR | FC | A+ |  | RWN | RW | 2025-12-25 |  | A1237 |
| E1115 | LTIDR | FC | WD |  |  | WD | 2025-06-28 | 2025-08-06 | A1251 |
| E1121 | LTIDR | FC | A |  | RWN | RW | 2024-04-24 | 2024-10-23 | A1262 |
| E1121 | LTIDR | FC | WD |  |  | WD | 2024-10-23 |  | A1263 |
| E1124 | LTIDR | FC | WD |  |  | WD | 2024-06-15 |  | A1268 |
| E1126 | LTIDR | FC | BB |  | RWN | RW | 2025-07-10 |  | A1272 |
| E1132 | LTIDR | FC | B+ |  | RWN | RW | 2025-08-24 |  | A1284 |
| E1133 | LTIDR | FC | B+ |  | RWN | RW | 2025-10-11 |  | A1287 |
| E1138 | LTIDR | FC | WD |  |  | WD | 2024-12-26 |  | A1296 |
| E1140 | LTIDR | FC | WD |  |  | WD | 2025-09-15 |  | A1298 |
| E1146 | LTIDR | FC | BB |  | RWN | RW | 2025-08-12 |  | A1317 |
| E1152 | LTIDR | FC | B+ |  | RWN | RW | 2024-02-13 | 2025-01-16 | A1328 |
| E1155 | LTIDR | FC | WD |  |  | WD | 2026-03-22 |  | A1332 |
| E1158 | LTIDR | FC | WD |  |  | WD | 2026-02-27 | 2026-05-22 | A1339 |
| E1158 | LTIDR | FC | BBB |  | RWN | RW | 2026-05-22 | 2026-08-14 | A1337 |
| E1159 | LTIDR | FC | WD |  |  | WD | 2026-09-22 |  | A1342 |
| E1166 | LTIDR | FC | WD |  |  | WD | 2023-07-26 |  | A1356 |
| E1168 | LTIDR | FC | BBB- |  | RWN | RW | 2023-10-12 |  | A1362 |
| E1172 | LTIDR | FC | BB |  | RWN | RW | 2025-11-15 | 2026-03-12 | A1370 |
| E1172 | LTIDR | FC | WD |  |  | WD | 2026-03-12 |  | A1371 |
| E1181 | LTIDR | FC | A- |  | RWN | RW | 2025-01-06 |  | A1387 |
| E1194 | LTIDR | FC | A |  | RWN | RW | 2025-01-20 |  | A1410 |
| E1200 | LTIDR | FC | WD |  |  | WD | 2023-11-03 |  | A1422 |
| E1203 | LTIDR | FC | BBB+ |  | RWN | RW | 2023-09-02 |  | A1427 |
| E1205 | LTIDR | FC | WD |  |  | WD | 2025-11-16 |  | A1430 |
| E1206 | LTIDR | FC | WD |  |  | WD | 2025-11-20 |  | A1433 |
| E1209 | LTIDR | FC | BB |  | RWN | RW | 2024-09-09 |  | A1442 |
(29 more rows not shown)

Query 4:

| entity_id | name | lei | country | entity_type | parent_id | ultimate_parent_id | record_ids |
|---|---|---|---|---|---|---|---|
| CV | Republic of Corvenia |  | CV | SOV |  |  | CV |
| E01 | Kestrel Energy plc | 7245002OOPBG04092E43 | GB | CORP |  |  | E01 |
| E02 | Northwind Holdings plc | 213800PHEIYNJMHTDV74 | GB | CORP |  |  | E02 E03 |
| E04 | Northwind Finance BV | 213800LA5RYJLGXV2T85 | NL | FINSUB | E02 | E02 | E04 |
| E05 | Valdoria Telecom SA | 391200LESH03LMOY2U61 | VD | CORP |  |  | E05 |
| E06 | Orrin Bank AG | 549300AMVE3VRVG7HK43 | DE | BANK |  |  | E06 |
| E07 | Pellam Retail Ltd | 969500B6IUACELPI2291 | GB | CORP |  |  | E07 |
| E08 | Saxby Shipping SA | 969500KOTZ1JFIZSG796 | GR | CORP |  |  | E08 |
| E09 | Halden Group plc | 815600ASM9EHDG931T89 | GB | CORP |  |  | E09 |
| E10 | Halden Bank AG | 391200QYPVFF2O9K2039 | LU | BANK | E09 | E09 | E10 E17 |
| E11 | Halden Leasing SA | 549300XBZH4ULO9MQV55 | FR | FINSUB | E10 | E09 | E11 |
| E12 | Halden Foods Ltd | 213800IJDL4OJ4DG5T19 | GB | CORP |  |  | E12 |
| E13 | Orrin Bancorp Inc | 815600O8X8K2F154N214 | US | BANK |  |  | E13 |
| E14 | Marlow Utilities plc | 3912005AH2C1I9YF8106 | GB | CORP |  |  | E14 |
| E15 | Corvenia Power SA | 213800PBQVHVBBH6GV02 | CV | CORP |  |  | E15 |
| VD | Republic of Valdoria |  | VD | SOV |  |  | VD |

Query 5:

| 1 |
|---|
| 1 |

Run more queries, or give the final answers.
The model
```sql
SELECT count(DISTINCT e.entity_id) AS q9 FROM ratings r JOIN entities e ON list_contains(string_split(e.record_ids,' '), r.rated_id) WHERE r.rating_type='LTIDR' AND r.valid_from<='2026-10-01' AND (r.valid_to='' OR r.valid_to IS NULL OR r.valid_to>'2026-10-01') AND r.rating<>'WD';
```

```sql
SELECT 'dg2026' k, e.entity_id v, r.rating_type||r.ccy_basis||r.rating||r.valid_from x FROM ratings r JOIN entities e ON list_contains(string_split(e.record_ids,' '), r.rated_id) WHERE r.rating_type='LTIDR' AND r.action='DG' AND r.valid_from BETWEEN '2026-01-01' AND '2026-12-31'
UNION ALL
SELECT 'rwn', e.entity_id, r.rating FROM ratings r JOIN entities e ON list_contains(string_split(e.record_ids,' '), r.rated_id) WHERE r.rating_type='LTIDR' AND r.watch='RWN' AND r.valid_from<='2026-10-01' AND (r.valid_to='' OR r.valid_to>'2026-10-01')
UNION ALL
SELECT 'neg', e.entity_id, r.rating FROM ratings r JOIN entities e ON list_contains(string_split(e.record_ids,' '), r.rated_id) WHERE r.rating_type='LTIDR' AND r.outlook='NEG' AND r.valid_from<='2026-10-01' AND (r.valid_to='' OR r.valid_to>'2026-10-01')
UNION ALL
SELECT 'default', e.entity_id, r.rating||r.valid_from||r.valid_to FROM ratings r JOIN entities e ON list_contains(string_split(e.record_ids,' '), r.rated_id) WHERE r.rating IN ('D','RD','SD')
UNION ALL
SELECT 'ever_not_now', e.entity_id, '' FROM entities e WHERE EXISTS (SELECT 1 FROM ratings r WHERE r.rating_type='LTIDR' AND r.rating<>'WD' AND list_contains(string_split(e.record_ids,' '), r.rated_id)) AND NOT EXISTS (SELECT 1 FROM ratings r WHERE r.rating_type='LTIDR' AND r.rating<>'WD' AND list_contains(string_split(e.record_ids,' '), r.rated_id) AND r.valid_from<='2026-10-01' AND (r.valid_to='' OR r.valid_to>'2026-10-01'))
ORDER BY 1,2;
```

```sql
SELECT 'gb_issuers', count(DISTINCT e.entity_id) FROM ratings r JOIN entities e ON list_contains(string_split(e.record_ids,' '), 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 'lu', count(*) FROM entities WHERE country='LU'
UNION ALL SELECT 'entities', count(*) FROM entities
UNION ALL SELECT 'inst_rated', count(DISTINCT rated_id) FROM ratings WHERE rating_type='INST' AND rating<>'WD' AND valid_from<='2026-10-01' AND (valid_to='' OR valid_to>'2026-10-01')
UNION ALL SELECT 'inst_ig', count(DISTINCT rated_id) FROM ratings WHERE rating_type='INST' AND rating IN ('AAA','AA+','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 'wd_inst', count(*) FROM ratings WHERE rating_type='INST' AND rating='WD'
UNION ALL SELECT 'ratedid_nonmaster', count(*) FROM ratings r WHERE r.rating_type<>'INST' AND NOT EXISTS (SELECT 1 FROM entities e WHERE e.entity_id=r.rated_id);
```

```sql
SELECT e.entity_id, e.country, r.rating FROM ratings 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.valid_from<='2026-10-01' AND (r.valid_to='' OR r.valid_to>'2026-10-01') AND e.entity_type<>'SOV';
```


```sql
SELECT * FROM ratings WHERE rated_id IN ('E03','E17','E1002') OR rated_id LIKE 'E1%' AND false;
```
Query results
Query 1:

| q9 |
|---|
| 278 |

Query 2:

| k | v | x |
|---|---|---|
| default | E08 |  |
| dg2026 | E08 | LTIDRFCCCC2026-01-20 |
| dg2026 | E08 | LTIDRFCRD2026-07-08 |
| dg2026 | E10 | LTIDRFCBBB+2026-04-15 |
| dg2026 | E1034 | LTIDRFCBBB+2026-05-02 |
| dg2026 | E1051 | LTIDRFCA+2026-04-05 |
| dg2026 | E1051 | LTIDRFCA+2026-06-01 |
| dg2026 | E1053 | LTIDRFCBB2026-03-20 |
| dg2026 | E1057 | LTIDRFCBB2026-06-25 |
| dg2026 | E1058 | LTIDRFCBBB-2026-07-14 |
| dg2026 | E1064 | LTIDRFCBBB+2026-03-04 |
| dg2026 | E1080 | LTIDRFCA-2026-02-14 |
| dg2026 | E1093 | LTIDRFCB2026-07-25 |
| dg2026 | E1112 | LTIDRFCBBB2026-02-20 |
| dg2026 | E1144 | LTIDRFCB+2026-06-06 |
| dg2026 | E1151 | LTIDRFCBBB2026-01-26 |
| dg2026 | E1159 | LTIDRFCBBB+2026-06-16 |
| dg2026 | E1160 | LTIDRFCB2026-07-28 |
| dg2026 | E1163 | LTIDRFCBB+2026-03-19 |
| dg2026 | E1167 | LTIDRFCBB2026-09-07 |
| dg2026 | E1169 | LTIDRFCBB-2026-08-16 |
| dg2026 | E1186 | LTIDRFCBBB+2026-01-04 |
| dg2026 | E1213 | LTIDRFCA-2026-02-13 |
| dg2026 | E1213 | LTIDRFCBBB+2026-06-16 |
| dg2026 | E1228 | LTIDRFCBB+2026-06-28 |
| dg2026 | E1229 | LTIDRFCBB2026-05-06 |
| dg2026 | E1229 | LTIDRFCBB+2026-06-02 |
| dg2026 | E1243 | LTIDRFCBB2026-01-13 |
| dg2026 | E1255 | LTIDRFCBBB+2026-01-19 |
| dg2026 | E1263 | LTIDRFCBBB2026-03-03 |
| dg2026 | E1263 | LTIDRFCBBB-2026-06-16 |
| dg2026 | E1285 | LTIDRFCA2026-02-17 |
| dg2026 | E1290 | LTIDRFCB2026-08-16 |
| dg2026 | E1294 | LTIDRFCA+2026-07-11 |
| dg2026 | E1298 | LTIDRFCBBB2026-02-06 |
| dg2026 | E1300 | LTIDRFCBBB+2026-04-09 |
| dg2026 | E1300 | LTIDRFCBBB2026-05-06 |
| dg2026 | E1307 | LTIDRFCBB-2026-02-08 |
| ever_not_now | CV |  |
| ever_not_now | E01 |  |
| ever_not_now | E02 |  |
| ever_not_now | E05 |  |
| ever_not_now | E06 |  |
| ever_not_now | E07 |  |
| ever_not_now | E08 |  |
| ever_not_now | E09 |  |
| ever_not_now | E10 |  |
| ever_not_now | E1001 |  |
| ever_not_now | E1003 |  |
| ever_not_now | E1004 |  |
| ever_not_now | E1005 |  |
| ever_not_now | E1006 |  |
| ever_not_now | E1007 |  |
| ever_not_now | E1008 |  |
| ever_not_now | E1009 |  |
| ever_not_now | E1010 |  |
| ever_not_now | E1011 |  |
| ever_not_now | E1012 |  |
| ever_not_now | E1013 |  |
| ever_not_now | E1014 |  |
(291 more rows not shown)

Query 3:

| 'gb_issuers' | count(DISTINCT e.entity_id) |
|---|---|
| gb_issuers | 0 |
| lu | 1 |
| entities | 331 |
| inst_rated | 0 |
| inst_ig | 0 |
| wd_inst | 0 |
| ratedid_nonmaster | 0 |

Query 4:

(no rows)

Query 5:

(no rows)

Run more queries, or give the final answers.
The model
```sql
WITH cur AS (SELECT r.*, e.entity_id eid, e.country FROM ratings r LEFT JOIN entities e ON list_contains(string_split(e.record_ids,' '), r.rated_id) WHERE r.valid_from<='2026-10-01' AND COALESCE(NULLIF(r.valid_to,''),'9999')>'2026-10-01')
SELECT 'rwn' k, eid v, rating x FROM cur WHERE watch='RWN' AND rating_type='LTIDR'
UNION ALL SELECT 'neg', eid, rating FROM cur WHERE outlook='NEG' AND rating_type='LTIDR'
UNION ALL SELECT 'default', eid, rating FROM cur WHERE rating IN ('D','RD','SD')
UNION ALL SELECT 'gb', count(DISTINCT eid)::varchar, '' FROM cur WHERE country='GB' AND rating_type='LTIDR' AND rating<>'WD'
UNION ALL SELECT 'issuers', count(DISTINCT eid)::varchar, '' FROM cur WHERE rating_type='LTIDR' AND rating<>'WD'
UNION ALL SELECT 'issuers_nonsov', count(DISTINCT eid)::varchar, '' FROM cur c WHERE rating_type='LTIDR' AND rating<>'WD' AND eid NOT IN ('CV','VD')
UNION ALL SELECT 'inst_rated', count(DISTINCT rated_id)::varchar, '' FROM cur WHERE rating_type='INST' AND rating<>'WD'
UNION ALL SELECT 'inst_ig', count(DISTINCT rated_id)::varchar, '' FROM cur WHERE rating_type='INST' AND rating IN ('AAA','AA+','AA','AA-','A+','A','A-','BBB+','BBB','BBB-')
UNION ALL SELECT 'ceil', eid, c.rating||'/'||ce.ceiling FROM cur c JOIN ceilings ce ON ce.country=c.country WHERE rating_type='LTIDR' AND ccy_basis='FC'
ORDER BY 1,2;
```

```sql
SELECT 'lostrating' k, e.entity_id v, '' x FROM entities e WHERE EXISTS (SELECT 1 FROM ratings r WHERE r.rating_type='LTIDR' AND r.rating<>'WD' AND list_contains(string_split(e.record_ids,' '), r.rated_id)) AND NOT EXISTS (SELECT 1 FROM ratings r WHERE r.rating_type='LTIDR' AND r.rating<>'WD' AND list_contains(string_split(e.record_ids,' '), r.rated_id) AND r.valid_from<='2026-10-01' AND COALESCE(NULLIF(r.valid_to,''),'9999')>'2026-10-01')
UNION ALL SELECT 'E1051', rated_id, rating_type||ccy_basis||rating||outlook||watch||action||valid_from FROM ratings WHERE rated_id='E1051'
UNION ALL SELECT 'ratedE03', rated_id, rating FROM ratings WHERE rated_id IN ('E03','E17','E1002','E1022','E1030')
UNION ALL SELECT 'ent_total', count(*)::varchar, '' FROM entities
UNION ALL SELECT 'lu', entity_id, name FROM entities WHERE country='LU'
UNION ALL SELECT 'name_dups', name, entity_id FROM entities WHERE name ILIKE '%Brindle%' OR name ILIKE '%Orrin%';
```
Query results
Query 1:

| k | v | x |
|---|---|---|
| ceil | CV | BBB+/A |
| ceil | E05 | BB/BB |
| ceil | E1019 | BB+/A |
| ceil | E1028 | BB/BB |
| ceil | E1039 | A/A |
| ceil | E1059 | BB-/A |
| ceil | E1071 | B+/A |
| ceil | E1096 | BBB/A |
| ceil | E1101 | BB/BB |
| ceil | E1106 | B+/BB |
| ceil | E1126 | BB/BB |
| ceil | E1136 | A-/A |
| ceil | E1144 | B+/A |
| ceil | E1185 | BB+/A |
| ceil | E1194 | A/A |
| ceil | E1217 | BB-/A |
| ceil | E1223 | BB+/A |
| ceil | E1229 | BB+/A |
| ceil | E1236 | BB/BB |
| ceil | E1243 | BB/A |
| ceil | E1279 | WD/BB |
| ceil | E1283 | BB/A |
| ceil | E1304 | BB/A |
| ceil | E1307 | BB-/BB |
| ceil | E1313 | BB-/BB |
| ceil | E15 | A/A |
| default | E08 | RD |
| gb | 66 |  |
| inst_ig | 66 |  |
| inst_rated | 106 |  |
| issuers | 278 |  |
| issuers_nonsov | 277 |  |
| neg | E01 | BBB |
| neg | E09 | A |
| neg | E1005 | BB |
| neg | E1029 | A- |
| neg | E1034 | BBB+ |
| neg | E1046 | AA- |
| neg | E1055 | BBB- |
| neg | E1056 | A+ |
| neg | E1059 | BB- |
| neg | E1064 | A- |
| neg | E1072 | BB- |
| neg | E1079 | BB+ |
| neg | E1080 | A- |
| neg | E1105 | A+ |
| neg | E1118 | BB+ |
| neg | E1158 | BBB |
| neg | E1160 | B |
| neg | E1188 | BB- |
| neg | E1190 | BBB |
| neg | E1211 | BBB- |
| neg | E1228 | BB+ |
| neg | E1248 | A- |
| neg | E1261 | B+ |
| neg | E1263 | BBB- |
| neg | E1271 | A- |
| neg | E1282 | BB+ |
| neg | E1294 | A+ |
| neg | E1300 | BBB |
(32 more rows not shown)

Query 2:

| k | v | x |
|---|---|---|
| lostrating | E1244 |  |
| lostrating | E1316 |  |
| lostrating | E1007 |  |
| lostrating | E1032 |  |
| lostrating | E1057 |  |
| lostrating | E1155 |  |
| lostrating | E1159 |  |
| lostrating | E1308 |  |
| lostrating | E1138 |  |
| lostrating | E1206 |  |
| lostrating | E1219 |  |
| lostrating | E1320 |  |
| lostrating | E1218 |  |
| lostrating | E1001 |  |
| lostrating | E1200 |  |
| lostrating | E1225 |  |
| lostrating | E1233 |  |
| lostrating | E1234 |  |
| lostrating | E07 |  |
| lostrating | E1166 |  |
| lostrating | E1021 |  |
| lostrating | E1048 |  |
| lostrating | E1084 |  |
| lostrating | E1062 |  |
| lostrating | E1121 |  |
| lostrating | E1205 |  |
| lostrating | E1041 |  |
| lostrating | E1063 |  |
| lostrating | E1107 |  |
| lostrating | E1140 |  |
| lostrating | E1076 |  |
| lostrating | E1277 |  |
| lostrating | E1124 |  |
| lostrating | E1172 |  |
| lostrating | E1253 |  |
| E1051 | E1051 |  |
| E1051 | E1051 |  |
| E1051 | E1051 |  |
| E1051 | E1051 |  |
| ent_total | 331 |  |
| lu | E10 | Halden Bank AG |
| name_dups | Orrin Bank AG | E06 |
| name_dups | Orrin Bancorp Inc | E13 |

Run more queries, or give the final answers.
The model
```sql
WITH cur AS (SELECT r.*, e.entity_id eid FROM ratings r JOIN entities e ON list_contains(string_split(e.record_ids,' '), r.rated_id) WHERE r.valid_from<='2026-10-01' AND COALESCE(NULLIF(r.valid_to,''),'9999')>'2026-10-01' AND rating_type='LTIDR')
SELECT 'rwn' k, string_agg(DISTINCT eid, ',' ORDER BY eid) v FROM cur WHERE watch='RWN'
UNION ALL SELECT 'neg', string_agg(DISTINCT eid, ',' ORDER BY eid) FROM cur WHERE outlook='NEG'
UNION ALL SELECT 'brindle', e.entity_id||' '||e.name||' '||coalesce((SELECT string_agg(r.rating_type||r.ccy_basis||r.rating||r.valid_from||'>'||r.valid_to, ';') FROM ratings r WHERE list_contains(string_split(e.record_ids,' '), r.rated_id)),'') FROM entities e WHERE name ILIKE '%Brindle%';
```
Query results
Query 1:

| k | v |
|---|---|
| rwn | 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 |
| neg | 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 |

Run more queries, or give the final answers.
The model
**Q1.** A-. E01's LTIDR FC rating was A- from 2024-03-12 to 2025-06-20 (A01).

**Q2.** No. E01 was affirmed at BBB with a Negative outlook on 2026-02-10 (A03), so there was no downgrade in 2026.

**Q3.** No, BB+. I02 was downgraded to BB+ on 2025-06-20 (A07), which is below investment grade.

**Q4.** Positive. E02 has been rated A with a POS outlook since 2025-09-15 (A09).

**Q5.** E02 (Northwind Holdings) is the credit risk, rated A. I03 is issued by E04 but guaranteed by E02, and its credit_risk_of is E02. The instrument rating is A (A11) and E02's issuer rating is also A (A09).

**Q6.** Not in the JSON. The Valdoria country ceiling is BB (from 2025-04-01), which caps E05's foreign-currency rating at BB (A14). The local-currency rating is BBB- (A13).

**Q7.** 31 issuers had a downgrade (DG) action in 2026, listed in the JSON. E1051 has two DG rows, both at A+, so one of them may not be a real step down.

**Q8.** E08. It was rated RD from 2026-07-08 (A22).

**Q9.** 278. This counts distinct entities with a current non-withdrawn LTIDR, after merging duplicate records, and includes the sovereign CV.

**Q10.** Depends. E05 is BB in foreign currency (sub-investment grade) and BBB- in local currency (investment grade).

**Q11.** BBB+. E14 held BBB+ from 2024-09-30 to 2025-11-20 (A36).

**Q12.** A-. E14 held A- from 2023-01-15 to 2024-09-30 (A34).

**Q13.** 1. The only downgrade is A36 on 2024-09-30; A35 is a watch action at the same rating.

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

**Q15.** A-. E10 held A- until 2026-04-15 (A26).

**Q16.** No. E14 was BBB+ on 2025-01-01 and is BBB+ now (A33). The watch period in between did not change the rating.

**Q17.** No. E06 went on Rating Watch Negative at A- on 2026-09-03 (A17), which is not a downgrade.

**Q18.** 32 issuers were on RWN on 1 October 2026, listed in the JSON. This includes E1019 and E1059, whose watch is on the local-currency rating only.

**Q19.** 28 issuers had a Negative outlook, listed in the JSON, including E01 (A03) and E09 (A25).

**Q20.** No. E07's rating was withdrawn (WD) on 2026-05-12 (A19), not set to a default grade.

**Q21.** 35 entities had an issuer rating at some point but none in force on 1 October 2026, listed in the JSON. They were all withdrawn, e.g. E07 (A19).

**Q22.** E08 only. It is the only entity with an RD rating (A22).

**Q23.** F2 (A04).

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

**Q25.** 66 instruments held an investment-grade (BBB- or above) rating on 1 October 2026.

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

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

**Q28.** BBB+ (CV LTIDR FC, A38).

**Q29.** None. The data has no ratings for VD; it only appears as a country with a ceiling of BB.

**Q30.** 8 entities were exactly at their country's ceiling: E05 (BB/BB), E1028, E1101, E1126, E1236 (all BB/BB), E1039, E1194 and E15 (all A/A).

**Q31.** No. Every foreign-currency issuer rating in VD or CV country was at or below its ceiling.

**Q32.** E09. E11's ultimate_parent_id is E09.

**Q33.** E10 (Halden Bank) is the credit risk, rated BBB+. I05 is issued by E11 but guaranteed by E10, and the instrument is BBB+ (A29), as is E10 (A27).

**Q34.** No. E12 (Halden Foods) has no parent, while E10 sits under E09.

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

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

**Q37.** 331 entities, after duplicate records are merged.

**Q38.** No. E06 (Orrin Bank AG, DE) and E13 (Orrin Bancorp Inc, US) are separate entities.

**Q39.** A (A09).

**Q40.** 66 distinct GB-domiciled entities held a non-withdrawn issuer rating.

**Q41.** None. No entity named Brindle Capital was found in the entities table.

**Q42.** LU (E10).

**Q43.** 1 (E10).

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

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

**Q46.** No. E11 has no ratings of its own; only its notes (I05) are rated.

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

**Q48.** 106 instruments held a non-withdrawn rating on 1 October 2026.

```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"]},
"Q8": {"entities": ["E08"]},
"Q9": {"count": 278},
"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"]},
"Q20": {"in_default": "no"},
"Q21": {"entities": ["E1244","E1316","E1007","E1032","E1057","E1155","E1159","E1308","E1138","E1206","E1219","E1320","E1218","E1001","E1200","E1225","E1233","E1234","E07","E1166","E1021","E1048","E1084","E1062","E1121","E1205","E1041","E1063","E1107","E1140","E1076","E1277","E1124","E1172","E1253"]},
"Q22": {"entities": ["E08"]},
"Q23": {"rating": "F2"},
"Q24": {"investment_grade": "yes"},
"Q25": {"count": 66},
"Q26": {"rating": "A+"},
"Q27": {"rating": "A-"},
"Q28": {"rating": "BBB+"},
"Q29": {"rating": "none"},
"Q30": {"entities": ["E05","E1028","E1039","E1101","E1126","E1194","E1236","E15"]},
"Q31": {"any": "no"},
"Q32": {"parent": "E09"},
"Q33": {"risk_of": "E10", "rating": "BBB+"},
"Q34": {"same_group": "no"},
"Q35": {"count": 3},
"Q36": {"count": 2},
"Q37": {"count": 331},
"Q38": {"same": "no"},
"Q39": {"rating": "A"},
"Q40": {"count": 66},
"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": 106}
}
```