CREATE TABLE "trader" (
tradereg character varying NOT NULL,
tradekind USER-DEFINED NULL,
acctdays integer NULL,
acctbal numeric NULL,
freqscope USER-DEFINED NULL,
voldaily numeric NULL,
posavg numeric NULL,
posspan USER-DEFINED NULL,
trading_performance jsonb NULL,
    PRIMARY KEY (tradereg)
);

First 3 rows:
tradereg    tradekind      acctdays      acctbal  freqscope      voldaily    posavg  posspan    trading_performance
----------  -----------  ----------  -----------  -----------  ----------  --------  ---------  ------------------------------------------------------------------------------------------------------------------
TR32485     Broker             1386  8.04279e+06  Medium          79650.9     68768  Intraday   {'winpct': 34.88, 'plratio': 2.3, 'risklevel': {'margpct': 24.48, 'levratio': 9.44, 'risklevel': 'Conservative'}}
TR16169     Individual         3206  1.41456e+06  Medium         494564      111835  Intraday   {'winpct': 68.01, 'plratio': 2.71, 'risklevel': {'margpct': 58.43, 'levratio': 7.47, 'risklevel': 'Moderate'}}
TR67490     Broker             1061  9.01803e+06  Medium         151127      293964  Long-term  {'winpct': 42.62, 'plratio': 1.79, 'risklevel': {'margpct': 51.07, 'levratio': 5.87, 'risklevel': 'Conservative'}}
...


CREATE TABLE "transactionrecord" (
transreg character varying NOT NULL,
transtime timestamp without time zone NOT NULL,
trdref character varying NOT NULL,
ordervar numeric NULL,
ordertimepat USER-DEFINED NULL,
ordertypedist USER-DEFINED NULL,
cancelpct numeric NULL,
modfreq numeric NULL,
darkusage character varying NULL,
offmkt character varying NULL,
crossfreq numeric NULL,
risk_indicators jsonb NULL,
    PRIMARY KEY (transreg),
    FOREIGN KEY (trdref) REFERENCES trader(tradereg)
);

First 3 rows:
transreg    transtime                   trdref      ordervar  ordertimepat    ordertypedist      cancelpct    modfreq    darkusage    offmkt    crossfreq  risk_indicators
----------  --------------------------  --------  ----------  --------------  ---------------  -----------  ---------  -----------  --------  -----------  ---------------------------------------------------------------------------------------------------------------------------------------------------------------
IT855524    2024-04-21 12:53:22.103260  TR47794        0.381  Irregular       Market                 0.208      0.486        0.114     0.124        0.017  {'washsus': 'Low', 'layerind': 'Suspected', 'spoofprob': 0.32, 'frontscore': 85.62, 'momentignit': 'Weak', 'qstuffindex': 0.519, 'markclosepat': 'Occasional'}
IT110951    2025-01-05 18:39:26.103260  TR47821        1.854  Irregular       Mixed                  0.213      0.164        0.338     0.016        0.058  {'washsus': 'High', 'layerind': 'Confirmed', 'spoofprob': 0.95, 'frontscore': 15.82, 'momentignit': 'Weak', 'qstuffindex': 0.528, 'markclosepat': 'Occasional'}
IT589692    2024-06-12 16:39:52.103260  TR74663        1.119  Regular         Mixed                  0.127      0.114        0.153     0.089        0.015  {'washsus': 'High', 'layerind': 'Confirmed', 'spoofprob': 0.25, 'frontscore': 16.94, 'momentignit': 'Weak', 'qstuffindex': 0.894, 'markclosepat': 'Occasional'}
...


CREATE TABLE "advancedbehavior" (
abhvreg character varying NOT NULL,
translink character varying NOT NULL,
patsim numeric NULL,
peercorr numeric NULL,
mktcorr numeric NULL,
secrotimp numeric NULL,
    PRIMARY KEY (abhvreg),
    FOREIGN KEY (translink) REFERENCES transactionrecord(transreg)
);

First 3 rows:
abhvreg     translink      patsim    peercorr    mktcorr    secrotimp
----------  -----------  --------  ----------  ---------  -----------
ABHV_0Z7PG  IT291460        0.823       0.525     -0.327       -0.793
ABHV_XIYLR  IT931600        0.457      -0.353     -0.324        0.371
ABHV_4WDLK  IT310545        0.06        0.382     -0.104       -0.183
...


CREATE TABLE "sentimentandfundamentals" (
sentreg character varying NOT NULL,
transref character varying NOT NULL,
newsscore numeric NULL,
socscore numeric NULL,
anlycount integer NULL,
inholdpct numeric NULL,
instownpct numeric NULL,
shortintrt numeric NULL,
optvolrt numeric NULL,
putcallrt numeric NULL,
impvolrank numeric NULL,
unuoptact USER-DEFINED NULL,
corpeventprx USER-DEFINED NULL,
eventannotm USER-DEFINED NULL,
infoleaksc numeric NULL,
trdref2 character varying NULL,
    PRIMARY KEY (sentreg),
    FOREIGN KEY (transref) REFERENCES transactionrecord(transreg),
    FOREIGN KEY (trdref2) REFERENCES trader(tradereg)
);

First 3 rows:
sentreg     transref      newsscore    socscore    anlycount    inholdpct    instownpct    shortintrt    optvolrt    putcallrt    impvolrank  unuoptact    corpeventprx    eventannotm      infoleaksc  trdref2
----------  ----------  -----------  ----------  -----------  -----------  ------------  ------------  ----------  -----------  ------------  -----------  --------------  -------------  ------------  ---------
SENT_XSX4T  IT291460           0.87        0.61           18        45.91          3.85         18.66        2.91         1.17         11.39  Moderate     Earnings        Pre-market            34.04
SENT_MOR6T  IT931600          -0.93       -0.48            9        37.78         64.69         18.89        1.39         0.85         91.47  Moderate     Restructuring   Intraday              41.03
SENT_HWFBT  IT310545           0.83        0.59           29        35.22         72.15         17.24        3.9          0.65         12.68  Moderate     M&A             Pre-market            12.66
...


CREATE TABLE "compliancecase" (
compreg character varying NOT NULL,
transref character varying NOT NULL,
regfilestat USER-DEFINED NULL,
disclosecmp USER-DEFINED NULL,
brokrepstat USER-DEFINED NULL,
exchnotif USER-DEFINED NULL,
prevviol integer NULL,
comprate USER-DEFINED NULL,
risksc numeric NULL,
alertlvl USER-DEFINED NULL,
invstprior USER-DEFINED NULL,
casestat USER-DEFINED NULL,
revfreq USER-DEFINED NULL,
lastrevdt date NULL,
nextrevdt date NULL,
monitint USER-DEFINED NULL,
survsys USER-DEFINED NULL,
detectmth USER-DEFINED NULL,
fposrate numeric NULL,
modelconf numeric NULL,
abhvref character varying NULL,
    PRIMARY KEY (compreg),
    FOREIGN KEY (abhvref) REFERENCES advancedbehavior(abhvreg),
    FOREIGN KEY (transref) REFERENCES transactionrecord(transreg)
);

First 3 rows:
compreg     transref    regfilestat    disclosecmp    brokrepstat    exchnotif      prevviol  comprate      risksc  alertlvl    invstprior    casestat       revfreq    lastrevdt    nextrevdt    monitint    survsys    detectmth      fposrate    modelconf  abhvref
----------  ----------  -------------  -------------  -------------  -----------  ----------  ----------  --------  ----------  ------------  -------------  ---------  -----------  -----------  ----------  ---------  -----------  ----------  -----------  ----------
CASE_GR8LZ  IT291460    Delayed        Full           Incomplete     Warning               1  B              58.84  Low         Low           Investigation  Monthly    2025-02-02   2025-03-19   Enhanced    Secondary  Automated          0.03        0.883  ABHV_0Z7PG
CASE_8YXF1  IT931600    Missing        Full           Late           Inquiry               1  A              49.31  Low         Low           Investigation  Monthly    2025-02-14   2025-03-07   Intensive   Secondary  Automated          0.14        0.613  ABHV_XIYLR
CASE_L2L48  IT310545    Delayed        Non-compliant  Incomplete     Warning               5  D              56.81  Critical    Low           Closed         Monthly    2025-02-07   2025-02-22   Intensive   Secondary  Hybrid             0.2         0.73   ABHV_4WDLK
...


CREATE TABLE "investigationdetails" (
invdetreg character varying NOT NULL,
compref character varying NOT NULL,
reginv USER-DEFINED NULL,
patrecsc numeric NULL,
behansc numeric NULL,
netansc numeric NULL,
relmapstat USER-DEFINED NULL,
connent character varying NULL,
commaddr integer NULL,
sharectc USER-DEFINED NULL,
finrel USER-DEFINED NULL,
commpat USER-DEFINED NULL,
tcirclesz integer NULL,
grpbehsc numeric NULL,
mktabprob numeric NULL,
evidstr USER-DEFINED NULL,
docustat USER-DEFINED NULL,
sentref character varying NULL,
    PRIMARY KEY (invdetreg),
    FOREIGN KEY (compref) REFERENCES compliancecase(compreg),
    FOREIGN KEY (sentref) REFERENCES sentimentandfundamentals(sentreg)
);

First 3 rows:
invdetreg    compref     reginv         patrecsc    behansc    netansc  relmapstat      connent    commaddr  sharectc    finrel    commpat      tcirclesz    grpbehsc    mktabprob  evidstr    docustat    sentref
-----------  ----------  -----------  ----------  ---------  ---------  ------------  ---------  ----------  ----------  --------  ---------  -----------  ----------  -----------  ---------  ----------  ----------
INV_WSENV    CASE_GR8LZ  Preliminary       42.51      37.76      68.91  Partial              19           3  Email       Business  Regular             32       41.87         0.18  Strong     Incomplete  SENT_XSX4T
INV_A9P2J    CASE_8YXF1  Preliminary       12.01      92.39      77.42  Partial               8           0  Email       Business  Irregular           50       74.18         0.99  Weak       Incomplete  SENT_MOR6T
INV_H8QVD    CASE_L2L48  Preliminary       88.2       73.36      47.35  Pending              12           1  Email       Business  Irregular           39       55.24         0.68  Strong     Partial     SENT_HWFBT
...


CREATE TABLE "enforcementactions" (
enforcereg character varying NOT NULL,
compref2 character varying NOT NULL,
acttake USER-DEFINED NULL,
esclvl USER-DEFINED NULL,
resstat USER-DEFINED NULL,
penimp USER-DEFINED NULL,
penamt numeric NULL,
legactstat USER-DEFINED NULL,
settlestat USER-DEFINED NULL,
repimp USER-DEFINED NULL,
busrestr USER-DEFINED NULL,
remedstat USER-DEFINED NULL,
traderestr USER-DEFINED NULL,
sysupdneed USER-DEFINED NULL,
polupdneed USER-DEFINED NULL,
trainreq USER-DEFINED NULL,
repgenstat USER-DEFINED NULL,
dataretstat USER-DEFINED NULL,
auditstat USER-DEFINED NULL,
conflvl USER-DEFINED NULL,
accrestr USER-DEFINED NULL,
datashare USER-DEFINED NULL,
invdetref character varying NULL,
    PRIMARY KEY (enforcereg),
    FOREIGN KEY (compref2) REFERENCES compliancecase(compreg),
    FOREIGN KEY (invdetref) REFERENCES investigationdetails(invdetreg)
);

First 3 rows:
enforcereg    compref2    acttake      esclvl      resstat      penimp      penamt  legactstat    settlestat    repimp    busrestr    remedstat     traderestr    sysupdneed    polupdneed    trainreq    repgenstat    dataretstat    auditstat    conflvl           accrestr    datashare    invdetref
------------  ----------  -----------  ----------  -----------  --------  --------  ------------  ------------  --------  ----------  ------------  ------------  ------------  ------------  ----------  ------------  -------------  -----------  ----------------  ----------  -----------  -----------
ENF_2MI2A     CASE_GR8LZ  Warning      Supervisor  Resolved     Warning   290459    Pending       Negotiating   Severe    Partial     Not Required  Special       Minor         Yes           Refresher   Hybrid        Archived       Complete     Normal            Internal    Limited      INV_WSENV
ENF_R2LMP     CASE_8YXF1  Warning      Compliance  In Progress  Warning    76804.6  Pending       Negotiating   Moderate  Partial     Pending       Special       Minor         No            Refresher   Hybrid        Archived       Missing      Highly Sensitive  Internal    Prohibited   INV_A9P2J
ENF_Q3872     CASE_L2L48  Restriction  Legal       In Progress  Warning   504728    Active        Settled       Moderate  Full        Pending       Blackout      Major         Yes           Refresher   Automated     Deleted        Complete     Sensitive         Internal    Prohibited   INV_H8QVD
...
