CREATE DATABASE IF NOT EXISTS `millistream`;
USE `millistream`;

CREATE TABLE IF NOT EXISTS `corporateactions` (
  `insref` bigint(20) unsigned NOT NULL,
  `type` smallint(5) unsigned NOT NULL,
  `subtype` smallint(5) unsigned default NULL,
  `dividend` double default NULL,
  `netdividend` double default NULL,
  `adjustmentfactor` double default NULL,
  `numberofshares` bigint(20) unsigned default NULL,
  `numberofprefshares` bigint(20) unsigned default NULL,
  `numberofsharesdelta` bigint(20) default NULL,
  `newshares` double default NULL,
  `oldshares` double default NULL,
  `subscriptionprice` double default NULL,
  `period` varchar(19) default NULL,
  `fiscalperiod` varchar(19) default NULL,
  `nominalvalue` double default NULL,
  `redemptionprice` double default NULL,
  `recorddate` date default NULL,
  `paymentdate` date default NULL,
  `announcementdate` date default NULL,
  `tid` double default NULL,
  `closeprice` double default NULL,
  `issuecurrency` varchar(4) default NULL,
  `tradecurrency` varchar(4) default NULL,
  `freetextcomment1` varchar(255) default NULL,
  `freetextcomment2` varchar(255) default NULL,
  `freetextcomment3` varchar(255) default NULL,
  `freetextcomment4` varchar(255) default NULL,
  `freetextcomment5` varchar(255) default NULL,
  `underlyingid` varchar(255) default NULL,
  `symbol` varchar(255) default NULL,
  `name` varchar(255) default NULL,
  `isin` char(12) default NULL,
  `boardlot` int(10) unsigned default NULL,
  `marketplace` bigint(20) unsigned default NULL,
  `list` varchar(255) default NULL,
  `votingpowerprc` double default NULL,
  `capitalprc` double default NULL,
  `mcap` double default NULL,
  `eventlink` char(36) default NULL,
  `eventlinklanguages` varchar(255) default NULL,
  `eventstatus` smallint(5) unsigned default NULL,
  `shareclass` varchar(4) default NULL,
  `lastmodified` datetime default NULL,
  `date` date NOT NULL,
  `time` time NOT NULL,
  PRIMARY KEY  (`insref`,`date`,`time`),
  KEY `corporateactionsindex1` (`insref`,`type`,`date`),
  KEY `corporateactionsindex2` (`insref`,`type`,`subtype`,`date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `instruments` (
  `insref` bigint(20) unsigned NOT NULL,
  `symbol` varchar(50) default NULL,
  `isin` char(12) default NULL,
  `name` varchar(255) default NULL,
  `sourcename` varchar(255) default NULL,
  `boardlot` int(10) unsigned default NULL,
  `instrumenttype` smallint(5) unsigned default NULL,
  `instrumentsubtype` smallint(5) unsigned default NULL,
  `instrumentclass` smallint(5) unsigned default NULL,
  `instrumentsubclass` varchar(30) default NULL,
  `instrumentsubsubclass` varchar(120) default NULL,
  `derivativeindicator` smallint(5) unsigned default NULL,
  `exercisetype` smallint(5) unsigned default NULL,
  `issuecurrency` varchar(4) default NULL,
  `tradecurrency` varchar(4) default NULL,
  `basecurrency` varchar(4) default NULL,
  `quotecurrency` varchar(4) default NULL,
  `issuedate` date default NULL,
  `strikedate` date default NULL,
  `strikeprice` double default NULL,
  `marketplace` bigint(20) unsigned default NULL,
  `primarymarketplace` bigint(20) unsigned default NULL,
  `primaryshare` bigint(20) unsigned default NULL,
  `submarket` bigint(20) unsigned default NULL,
  `sector` bigint(20) unsigned,
  `company` bigint(20) unsigned default NULL,
  `fundppmcode` int(10) unsigned default NULL,
  `fundpmicode` varchar(11) default NULL,
  `fundcompany` bigint(20) unsigned default NULL,
  `country` char(2) default NULL,
  `freetextcomment` varchar(255) default NULL,
  `numberofshares` bigint(20) unsigned default NULL,
  `numberofprefshares` bigint(20) unsigned default NULL,
  `nominalvalue` double default NULL,
  `mic` char(5) default NULL,
  `operatingmic` char(5) default NULL,
  `tradestate` smallint(5) unsigned default NULL,
  `tradestateactions` smallint(5) unsigned default NULL,
  `chairman` varchar(60) default NULL,
  `ceo` varchar(255) default NULL,
  `website` varchar(255) default NULL,
  `orgnum` varchar(11) default NULL,
  `orgnum_no` bigint(9) unsigned default NULL,
  `cvr` int(10) unsigned default NULL,
  `y_tunnus` varchar(9) default NULL,
  `kennitala` bigint(10) unsigned default NULL,
  `cik` bigint(10) unsigned default NULL,
  `shortdescription` text default NULL,
  `description` mediumtext default NULL,
  `genderceo` char(1) default NULL,
  `genderchairman` char(1) default NULL,
  `birthyearceo` smallint(5) unsigned default NULL,
  `birthyearchairman` smallint(5) unsigned default NULL,
  `address` varchar(255) default NULL,
  `postalcode` varchar(255) default NULL,
  `city` varchar(50) default NULL,
  `telephone` varchar(40) default NULL,
  `fax` varchar(40) default NULL,
  `email` varchar(255) default NULL,
  `importantevents` mediumtext default NULL,
  `contractsize` double default NULL,
  `baseratio` double default NULL,
  `sourceid` varchar(32) default NULL,
  `issuer` varchar(255) default NULL,
  `issuername` varchar(255) default NULL,
  `ongoingcharge` double default NULL,
  `fundyearlymgmtfee` double default NULL,
  `fundppmfee`double default NULL,
  `fundleverage` double default NULL,
  `funddirection` varchar(5) default NULL,
  `fundbenchmark` varchar(255) default NULL,
  `fundbenchmarkinsref` bigint(20) unsigned default NULL,
  `fundppmtype` varchar(255) default NULL,
  `fundrisk` smallint(5) unsigned default NULL,
  `prospectus` text default NULL,
  `geofocusregion` varchar(20) default NULL,
  `geofocuscountry` varchar(20) default NULL,
  `openinterest` double default NULL,
  `geniumid` int(10) unsigned default NULL,
  `cusip` varchar(9) default NULL,
  `wkn` varchar(6) default NULL,
  `ucits` smallint(5) unsigned default NULL,
  `inceptiondate` date default NULL,
  `barrierprice` double default NULL,
  `ceoadmissiondate` date default NULL,
  `chairmanadmissiondate` date default NULL,
  `coupondate` date default NULL,
  `couponrate` double default NULL,
  `couponfrequency` smallint(5) unsigned default NULL,
  `fundmcap` double default NULL,
  `fundminadditionalamount` double default NULL,
  `fundminstartamount` double default NULL,
  `fundminsubscriptionamount` double default NULL,
  `fundperformancefee` double default NULL,
  `purchasefee` double default NULL,
  `salesfee` double default NULL,
  `totalfee` double default NULL,
  `morningstarrating` smallint(5) unsigned default NULL,
  `tradedthroughdate` date default NULL,
  `dividendtype` smallint(5) unsigned default NULL,
  `dividendfrequency` smallint(5) unsigned default NULL,
  `pricingfrequency` smallint(5) unsigned default NULL,
  `eusipa` int unsigned default NULL,
  `convertfromdate` date default NULL,
  `converttodate` date default NULL,
  `conversionprice` double default NULL,
  `specialcondition` int(10) unsigned default NULL,
  `settlementtype` smallint(5) unsigned default NULL,
  `votingpower` double default NULL,
  `cap` double default NULL,
  `pricetype` smallint(5) unsigned default NULL,
  `volumedimension` smallint(5) unsigned default NULL,
  `quotingtype` smallint(5) unsigned default NULL,
  `asiantailstart` date default NULL,
  `asiantailend` date default NULL,
  `logotype` text default NULL,
  `ticktable` bigint(20) unsigned default NULL,
  `contractvalue` double default NULL,
  `financinglevel` double default NULL,
  `unitlinkcompany` varchar(255) default NULL,
  `participationrate` double default NULL,
  `issueprice` double default NULL,
  `fiinstitutenumber` bigint(20) unsigned default NULL,
  `kiid` text default NULL,
  `cfi` char(6) default NULL,
  `maxlevel` double default NULL,
  `outstandingamount` double default NULL,
  `interestrate` double default NULL,
  `marketmaker` varchar(255) default NULL,
  `marketopendays` int(10) unsigned NULL,
  `marketopen` time default NULL,
  `marketclose` time default NULL,
  `marketearlyclose` time default NULL,
  `legalstructure` varchar(255) default NULL,
  `productcode` varchar(20) default NULL,
  `latestyearendreport` varchar(4) default NULL,
  `csr` double default NULL,
  `activeshare` double default NULL,
  `trackingerror` double default NULL,
  `figi` varchar(12) default NULL,
  `figicomposite` varchar(12) default NULL,
  `figishareclass` varchar(12) default NULL,
  `figisecuritytype` varchar(40) default NULL,
  `daycountconvention` smallint(5) unsigned default NULL,
  `expirationtype` smallint(5) unsigned default NULL,
  `tenor` varchar(5) default NULL,
  `swingfactor` double default NULL,
  `swingfactorsub` double default NULL,
  `swingmethod` smallint(5) unsigned default NULL,
  `clearing` varchar(255) default NULL,
  `applicablenav` varchar(10) default NULL,
  `fundcutofftime` varchar(20) default NULL,
  `shareclass` varchar(4) default NULL,
  `lastmodified` datetime default NULL,
  `time` time default NULL,
  `date` date default NULL,
  PRIMARY KEY  (`insref`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `listmappings` (
  `list` bigint(20) unsigned NOT NULL,
  `insref` bigint(20) unsigned NOT NULL,
  PRIMARY KEY (`list`, `insref`),
  KEY `insrefindex` (`insref`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `news` (
  `newsref` bigint(20) unsigned NOT NULL,
  `headline` varchar(255) NOT NULL,
  `text` mediumtext default NULL,
  `newstype` smallint(5) default NULL,
  `subject` smallint(5) default NULL,
  `regulatory` smallint(5) default NULL,
  `language` char(2) default NULL,
  `newsid` char(36) NOT NULL,
  `groupid` char(36) default NULL,
  `replaces` char(36) default NULL,
  `originalcode` varchar(255) default NULL,
  `rank` smallint(5) default NULL,
  `impact` smallint(5) default NULL,
  `package` bigint(20) unsigned default NULL,
  `lastmodified` datetime default NULL,
  `time` time NOT NULL,
  `date` date NOT NULL,
  PRIMARY KEY  (`newsid`),
  KEY `newsindex` (`newsref`,`date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `quotes` (
  `insref` bigint(20) unsigned NOT NULL,
  `bidprice` double default NULL,
  `bidquantity` double default NULL,
  `askprice` double default NULL,
  `askquantity` double default NULL,
  `lastprice` double default NULL,
  `dayhighprice` double default NULL,
  `daylowprice` double default NULL,
  `quantity` bigint(20) unsigned default NULL,
  `internalquantity` bigint(20) unsigned default NULL,
  `offbookquantity` bigint(20) unsigned default NULL,
  `darkquantity` bigint(20) unsigned default NULL,
  `turnover` decimal(38,7) unsigned default NULL,
  `internalturnover` decimal(38,7) unsigned default NULL,
  `offbookturnover` decimal(38,7) unsigned default NULL,
  `darkturnover` decimal(38,7) unsigned default NULL,
  `numtrades` bigint(20) unsigned default NULL,
  `openprice` double default NULL,
  `bidyield` double default NULL,
  `askyield` double default NULL,
  `lastyield` double default NULL,
  `openyield` double default NULL,
  `dayhighyield` double default NULL,
  `daylowyield` double default NULL,
  `nav` double default NULL,
  `tis` double default NULL,
  `unchangedpaid` int(10) unsigned default NULL,
  `pluspaid` int(10) unsigned default NULL,
  `minuspaid` int(10) unsigned default NULL,
  `vwap` double default NULL,
  `duration` double default NULL,
  `settlementprice` double default NULL,
  `time` time default NULL,
  `date` date default NULL,
  PRIMARY KEY  (`insref`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `quotesex` (
  `insref` bigint(20) unsigned NOT NULL,
  `bidprice` double default NULL,
  `bidquantity` double default NULL,
  `askprice` double default NULL,
  `askquantity` double default NULL,
  `lastprice` double default NULL,
  `dayhighprice` double default NULL,
  `daylowprice` double default NULL,
  `quantity` bigint(20) unsigned default NULL,
  `turnover` decimal(38,7) unsigned default NULL,
  `numtrades` bigint(20) unsigned default NULL,
  `time` time default NULL,
  `date` date default NULL,
  PRIMARY KEY  (`insref`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `orderbooks` (
  `insref` bigint(20) unsigned NOT NULL,
  `price` double NOT NULL,
  `quantity` double default NULL,
  `side` char(1) character set ascii NOT NULL,
  `numorders` smallint(5) unsigned default NULL,
  `counterparties` varchar(255) default NULL,
  `mmo` smallint(5) unsigned default NULL,
  `time` time NOT NULL,
  `date` date NOT NULL,
  PRIMARY KEY  (`insref`,`price`,`side`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `mbo` (
  `insref` bigint(20) unsigned NOT NULL,
  `id` bigint(20) unsigned NOT NULL,
  `id_source` varchar(255) default NULL,
  `side` smallint(5) unsigned default NULL,
  `priority` bigint(20) unsigned default NULL,
  `price` double default NULL,
  `quantity` double default NULL,
  `participant` varchar(255) default NULL,
  `mmo` smallint(5) unsigned default NULL,
  `time` time NOT NULL,
  `date` date NOT NULL,
  PRIMARY KEY  (`insref`,`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `pricehistory` (
  `insref` bigint(20) unsigned NOT NULL,
  `type` smallint(5) unsigned default NULL,
  `closebidprice` double default NULL,
  `closeaskprice` double default NULL,
  `closetradeprice` double default NULL,
  `closeprice` double default NULL,
  `closedayhighprice` double default NULL,
  `closedaylowprice` double default NULL,
  `closequantity` bigint(20) unsigned default NULL,
  `closeinternalquantity` bigint(20) unsigned default NULL,
  `closeoffbookquantity` bigint(20) unsigned default NULL,
  `closedarkquantity` bigint(20) unsigned default NULL,
  `closeturnover` decimal(38,7) unsigned default NULL,
  `closeinternalturnover` decimal(38,7) unsigned default NULL,
  `closeoffbookturnover` decimal(38,7) unsigned default NULL,
  `closedarkturnover` decimal(38,7) unsigned default NULL,
  `openprice` double default NULL,
  `numtrades` bigint(20) unsigned default NULL,
  `openyield` double default NULL,
  `closebidyield` double default NULL,
  `closeaskyield` double default NULL,
  `closeyield` double default NULL,
  `closedayhighyield` double default NULL,
  `closedaylowyield` double default NULL,
  `closenav` double default NULL,
  `closetis` double default NULL,
  `closevwap` double default NULL,
  `mcap` decimal(38,7) unsigned default NULL,
  `settlementprice` double default NULL,
  `lastmodified` datetime default NULL,
  `time` time NOT NULL,
  `date` date NOT NULL,
  PRIMARY KEY  (`insref`,`date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `adjustedpricehistory` (
  `insref` bigint(20) unsigned NOT NULL,
  `type` smallint(5) unsigned default NULL,
  `closebidprice` double default NULL,
  `closeaskprice` double default NULL,
  `closetradeprice` double default NULL,
  `closeprice` double default NULL,
  `closedayhighprice` double default NULL,
  `closedaylowprice` double default NULL,
  `closequantity` bigint(20) unsigned default NULL,
  `closeinternalquantity` bigint(20) unsigned default NULL,
  `closeoffbookquantity` bigint(20) unsigned default NULL,
  `closedarkquantity` bigint(20) unsigned default NULL,
  `closeturnover` decimal(38,7) unsigned default NULL,
  `closeinternalturnover` decimal(38,7) unsigned default NULL,
  `closeoffbookturnover` decimal(38,7) unsigned default NULL,
  `closedarkturnover` decimal(38,7) unsigned default NULL,
  `openprice` double default NULL,
  `numtrades` bigint(20) unsigned default NULL,
  `openyield` double default NULL,
  `closebidyield` double default NULL,
  `closeaskyield` double default NULL,
  `closeyield` double default NULL,
  `closedayhighyield` double default NULL,
  `closedaylowyield` double default NULL,
  `closenav` double default NULL,
  `closetis` double default NULL,
  `closevwap` double default NULL,
  `mcap` decimal(38,7) unsigned default NULL,
  `settlementprice` double default NULL,
  `lastmodified` datetime default NULL,
  `time` time NOT NULL,
  `date` date NOT NULL,
  PRIMARY KEY  (`insref`,`date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `stats` (
  `name` varchar(255) NOT NULL,
  `value` varchar(255) NOT NULL,
  PRIMARY KEY  (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `trades` (
  `insref` bigint(20) unsigned NOT NULL,
  `tradeprice` double default NULL,
  `tradeyield` double default NULL,
  `tradequantity` double default NULL,
  `tradereference` varchar(255) COLLATE utf8_bin NOT NULL,
  `tradecode` int(10) unsigned NOT NULL,
  `mmt` char(14) COLLATE utf8_bin default NULL,
  `tradetype` varchar(10) default NULL,
  `buyer` varchar(64) default NULL,
  `seller` varchar(64) default NULL,
  `executedside` char(1) default NULL,
  `canceltime` time default NULL,
  `agreementtime` time default NULL,
  `agreementdate` date default NULL,
  `executionvenue` varchar(255) default NULL,
  `currency` varchar(4) default NULL,
  `time` time NOT NULL,
  `date` date NOT NULL,
  PRIMARY KEY  (`insref`,`date`,`tradereference`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `fundamentals` (
  `insref` bigint(20) unsigned NOT NULL,
  `sales` double default NULL,
  `ebit` double default NULL,
  `ebita` double default NULL,
  `ebitda` double default NULL,
  `financialincome` double default NULL,
  `financialcost` double default NULL,
  `ptp` double default NULL,
  `np` double default NULL,
  `eps` double default NULL,
  `eps_ttm` double default NULL,
  `eps_last` double default NULL,
  `dilutedeps` double default NULL,
  `netfinancialincome` double default NULL,
  `equityratio` double default NULL,
  `numberofshares` double default NULL,
  `operatingcashflow` double default NULL,
  `gp` double default NULL,
  `intangibleasset` double default NULL,
  `goodwill` double default NULL,
  `fixedasset` double default NULL,
  `financialasset` double default NULL,
  `noncurrentasset` double default NULL,
  `inventory` double default NULL,
  `othercurrentasset` double default NULL,
  `accountsreceivable` double default NULL,
  `otherreceivables` double default NULL,
  `shortterminv` double default NULL,
  `cce` double default NULL,
  `currentassets` double default NULL,
  `totalassets` double default NULL,
  `shequity` double default NULL,
  `minorityinterest` double default NULL,
  `provisions` double default NULL,
  `ltliabilities` double default NULL,
  `curliabilities` double default NULL,
  `totsheqliabilities` double default NULL,
  `nibl` double default NULL,
  `ibl` double default NULL,
  `cashflowbwc` double default NULL,
  `cashflowawc` double default NULL,
  `cashflowia` double default NULL,
  `cashflowfa` double default NULL,
  `cashflowtotal` double default NULL,
  `fcff` double default NULL,
  `netinterestincome` double default NULL,
  `interestincome` double default NULL,
  `otherfinancialincome` double default NULL,
  `interestexpense` double default NULL,
  `otherfinancialexpense` double default NULL,
  `minorityinterestres` double default NULL,
  `capex` double default NULL,
  `rouamortization` double default NULL,
  `accountspayable` double default NULL,
  `eventlink` char(36) default NULL,
  `eventlinklanguages` varchar(255) default NULL,
  `numemployees` double default NULL,
  `dividend` double default NULL,
  `incomepropman` double default NULL,
  `period` varchar(7) NOT NULL,
  `fiscalperiod` char(19) default NULL,
  `currency` char(3) NOT NULL,
  `adjustmentfactor` double default NULL,
  `source` char(15) NOT NULL default 'Millistream',
  `date` date NOT NULL,
  `announcementdate` date default NULL,
  `dy` double default NULL,
  `per_ttm` double default NULL,
  `per_last` double default NULL,
  `psr_ttm` double default NULL,
  `psr_last` double default NULL,
  `pbr` double default NULL,
  `pcf_ttm` double default NULL,
  `pcf_last` double default NULL,
  `sps_ttm` double default NULL,
  `sps_last` double default NULL,
  `bvps` double default NULL,
  `cfps_ttm` double default NULL,
  `cfps_last` double default NULL,
  `roe_ttm` double default NULL,
  `roe_last` double default NULL,
  `roa_ttm` double default NULL,
  `roa_last` double default NULL,
  `gm` double default NULL,
  `gm_ttm` double default NULL,
  `om` double default NULL,
  `om_ttm` double default NULL,
  `pm` double default NULL,
  `pm_ttm` double default NULL,
  `der` double default NULL,
  `nd_ebitda_ttm` double default NULL,
  `nd_ebitda_last` double default NULL,
  `dpr` double default NULL,
  `roic_ttm` double default NULL,
  `roic_last` double default NULL,
  `peg_ttm` double default NULL,
  `peg_last` double default NULL,
  `closeprice` double default NULL,
  `lastmodified` datetime default NULL,
  PRIMARY KEY  (`insref`,`period`,`currency`,`source`),
  KEY `fundamentalsindex` (`insref`,`period`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `estimates` (
  `insref` bigint(20) unsigned NOT NULL,
  `period` varchar(7) NOT NULL,
  `field` varchar(30) NOT NULL,
  `aspect` varchar(10) NOT NULL,
  `type` varchar(20) NOT NULL,
  `unit` varchar(255) NULL,
  `average` double default NULL,
  `min` double default NULL,
  `max` double default NULL,
  `count` int(10) unsigned default NULL,
  `currency` char(3) NOT NULL,
  `source` char(15) NOT NULL,
  `lastmodified` datetime default NULL,
  `date` date NOT NULL,
  `time` time NOT NULL,
  PRIMARY KEY  (`insref`,`period`,`field`,`aspect`,`type`,`currency`,`source`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `estimateshistory` (
  `insref` bigint(20) unsigned NOT NULL,
  `period` varchar(7) NOT NULL,
  `field` varchar(30) NOT NULL,
  `aspect` varchar(10) NOT NULL,
  `type` varchar(20) NOT NULL,
  `unit` varchar(255) NULL,
  `average` double default NULL,
  `min` double default NULL,
  `max` double default NULL,
  `count` int(10) unsigned default NULL,
  `currency` char(3) NOT NULL,
  `source` char(15) NOT NULL,
  `lastmodified` datetime default NULL,
  `date` date NOT NULL,
  `time` time NOT NULL,
  PRIMARY KEY  (`insref`,`date`,`period`,`field`,`aspect`,`type`,`currency`,`source`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `performance` (
  `insref` bigint(20) unsigned NOT NULL,
  `closebidprice1d` double default NULL,
  `closebidprice1w` double default NULL,
  `closeprice` double default NULL,
  `closeprice1d` double default NULL,
  `closeprice1w` double default NULL,
  `closeprice2w` double default NULL,
  `closeprice1m` double default NULL,
  `closeprice3m` double default NULL,
  `closeprice6m` double default NULL,
  `closeprice9m` double default NULL,
  `closeprice1y` double default NULL,
  `closeprice2y` double default NULL,
  `closeprice3y` double default NULL,
  `closeprice4y` double default NULL,
  `closeprice5y` double default NULL,
  `closeprice6y` double default NULL,
  `closeprice7y` double default NULL,
  `closeprice8y` double default NULL,
  `closeprice9y` double default NULL,
  `closeprice10y` double default NULL,
  `closepricewtd` double default NULL,
  `closepricemtd` double default NULL,
  `closepriceqtd` double default NULL,
  `closepriceytd` double default NULL,
  `closepricepytd` double default NULL,
  `closepriceld` double default NULL,
  `closebidyield1d` double default NULL,
  `closebidyield1w` double default NULL,
  `closeyield1d` double default NULL,
  `closeyield1w` double default NULL,
  `closeyield2w` double default NULL,
  `closeyield1m` double default NULL,
  `closeyield3m` double default NULL,
  `closeyield6m` double default NULL,
  `closeyield9m` double default NULL,
  `closeyield1y` double default NULL,
  `closeyield2y` double default NULL,
  `closeyield3y` double default NULL,
  `closeyield4y` double default NULL,
  `closeyield5y` double default NULL,
  `closeyield6y` double default NULL,
  `closeyield7y` double default NULL,
  `closeyield8y` double default NULL,
  `closeyield9y` double default NULL,
  `closeyield10y` double default NULL,
  `closeyieldwtd` double default NULL,
  `closeyieldmtd` double default NULL,
  `closeyieldqtd` double default NULL,
  `closeyieldytd` double default NULL,
  `closeyieldpytd` double default NULL,
  `closeyieldld` double default NULL,
  `ath` double default NULL,
  `atl` double default NULL,
  `highprice1y` double default NULL,
  `lowprice1y` double default NULL,
  `highprice3y` double default NULL,
  `lowprice3y` double default NULL,
  `highprice5y` double default NULL,
  `lowprice5y` double default NULL,
  `highprice10y` double default NULL,
  `lowprice10y` double default NULL,
  `highpriceytd` double default NULL,
  `lowpriceytd` double default NULL,
  `closepricedate` date default NULL,
  `closeprice1ddate` date default NULL,
  `athdate` date default NULL,
  `atldate` date default NULL,
  `highprice1ydate` date default NULL,
  `lowprice1ydate` date default NULL,
  `highpriceytddate` date default NULL,
  `lowpriceytddate` date default NULL,
  `athyield` double default NULL,
  `atlyield` double default NULL,
  `highyield1y` double default NULL,
  `lowyield1y` double default NULL,
  `highyieldytd` double default NULL,
  `lowyieldytd` double default NULL,
  `athyielddate` date default NULL,
  `atlyielddate` date default NULL,
  `highyield1ydate` date default NULL,
  `lowyield1ydate` date default NULL,
  `highyieldytddate` date default NULL,
  `lowyieldytddate` date default NULL,
  `diffbid1d` double default NULL,
  `diffbid1w` double default NULL,
  `diff1d` double default NULL,
  `diffex1d` double default NULL,
  `diff1w` double default NULL,
  `diff2w` double default NULL,
  `diff1m` double default NULL,
  `diff3m` double default NULL,
  `diff6m` double default NULL,
  `diff9m` double default NULL,
  `diff1y` double default NULL,
  `diff2y` double default NULL,
  `diff3y` double default NULL,
  `diff4y` double default NULL,
  `diff5y` double default NULL,
  `diff6y` double default NULL,
  `diff7y` double default NULL,
  `diff8y` double default NULL,
  `diff9y` double default NULL,
  `diff10y` double default NULL,
  `diffld` double default NULL,
  `diffwtd` double default NULL,
  `diffmtd` double default NULL,
  `diffqtd` double default NULL,
  `diffytd` double default NULL,
  `diffpytd` double default NULL,
  `diffbid1dprc` double default NULL,
  `diffbid1wprc` double default NULL,
  `diff1dprc` double default NULL,
  `diffex1dprc` double default NULL,
  `diff1wprc` double default NULL,
  `diff2wprc` double default NULL,
  `diff1mprc` double default NULL,
  `diff3mprc` double default NULL,
  `diff6mprc` double default NULL,
  `diff9mprc` double default NULL,
  `diff1yprc` double default NULL,
  `diff2yprc` double default NULL,
  `diff3yprc` double default NULL,
  `diff4yprc` double default NULL,
  `diff5yprc` double default NULL,
  `diff6yprc` double default NULL,
  `diff7yprc` double default NULL,
  `diff8yprc` double default NULL,
  `diff9yprc` double default NULL,
  `diff10yprc` double default NULL,
  `diffldprc` double default NULL,
  `diffwtdprc` double default NULL,
  `diffmtdprc` double default NULL,
  `diffqtdprc` double default NULL,
  `diffytdprc` double default NULL,
  `diffpytdprc` double default NULL,
  `diffbidyield1d` double default NULL,
  `diffbidyield1w` double default NULL,
  `diffyield1d` double default NULL,
  `diffyield1w` double default NULL,
  `diffyield2w` double default NULL,
  `diffyield1m` double default NULL,
  `diffyield3m` double default NULL,
  `diffyield6m` double default NULL,
  `diffyield9m` double default NULL,
  `diffyield1y` double default NULL,
  `diffyield2y` double default NULL,
  `diffyield3y` double default NULL,
  `diffyield4y` double default NULL,
  `diffyield5y` double default NULL,
  `diffyield6y` double default NULL,
  `diffyield7y` double default NULL,
  `diffyield8y` double default NULL,
  `diffyield9y` double default NULL,
  `diffyield10y` double default NULL,
  `diffyieldld` double default NULL,
  `diffyieldwtd` double default NULL,
  `diffyieldmtd` double default NULL,
  `diffyieldqtd` double default NULL,
  `diffyieldytd` double default NULL,
  `diffyieldpytd` double default NULL,
  `diffbidyield1dprc` double default NULL,
  `diffbidyield1wprc` double default NULL,
  `diffyield1dprc` double default NULL,
  `diffyield1wprc` double default NULL,
  `diffyield2wprc` double default NULL,
  `diffyield1mprc` double default NULL,
  `diffyield3mprc` double default NULL,
  `diffyield6mprc` double default NULL,
  `diffyield9mprc` double default NULL,
  `diffyield1yprc` double default NULL,
  `diffyield2yprc` double default NULL,
  `diffyield3yprc` double default NULL,
  `diffyield4yprc` double default NULL,
  `diffyield5yprc` double default NULL,
  `diffyield6yprc` double default NULL,
  `diffyield7yprc` double default NULL,
  `diffyield8yprc` double default NULL,
  `diffyield9yprc` double default NULL,
  `diffyield10yprc` double default NULL,
  `diffyieldldprc` double default NULL,
  `diffyieldwtdprc` double default NULL,
  `diffyieldmtdprc` double default NULL,
  `diffyieldqtdprc` double default NULL,
  `diffyieldytdprc` double default NULL,
  `diffyieldpytdprc` double default NULL,
  `annualizedreturn1y` double default NULL,
  `annualizedreturn2y` double default NULL,
  `annualizedreturn3y` double default NULL,
  `annualizedreturn4y` double default NULL,
  `annualizedreturn5y` double default NULL,
  `annualizedreturn10y` double default NULL,
  `standarddeviation3y` double default NULL,
  `sharperatio3y` double default NULL,
  `normanamount` double default NULL,
  `avgturnover1w` double default NULL,
  `avgturnover1m` double default NULL,
  `avgturnover3m` double default NULL,
  `avgturnover1y` double default NULL,
  `avgturnoverytd` double default NULL,
  `time` time default NULL,
  `date` date default NULL,
  PRIMARY KEY  (`insref`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `keyratios` (
  `insref` bigint(20) unsigned NOT NULL,
  `dividendyield` double default NULL,
  `per` double default NULL,
  `per_ttm` double default NULL,
  `per_last` double default NULL,
  `psr` double default NULL,
  `psr_ttm` double default NULL,
  `psr_last` double default NULL,
  `pbr` double default NULL,
  `pbr_last` double default NULL,
  `pcf` double default NULL,
  `pcf_ttm` double default NULL,
  `pcf_last` double default NULL,
  `dps` double default NULL,
  `eps` double default NULL,
  `eps_ttm` double default NULL,
  `eps_last` double default NULL,
  `sps` double default NULL,
  `sps_ttm` double default NULL,
  `sps_last` double default NULL,
  `bvps` double default NULL,
  `bvps_last` double default NULL,
  `cfps` double default NULL,
  `cfps_ttm` double default NULL,
  `cfps_last` double default NULL,
  `roe` double default NULL,
  `roe_ttm` double default NULL,
  `roe_last` double default NULL,
  `roa` double default NULL,
  `roa_ttm` double default NULL,
  `roa_last` double default NULL,
  `gm` double default NULL,
  `gm_ttm` double default NULL,
  `gm_last` double default NULL,
  `om` double default NULL,
  `om_ttm` double default NULL,
  `om_last` double default NULL,
  `pm` double default NULL,
  `pm_ttm` double default NULL,
  `pm_last` double default NULL,
  `mcap` double default NULL,
  `sma20` double default NULL,
  `sma50` double default NULL,
  `sma200` double default NULL,
  `rsi14` double default NULL,
  `macd` double default NULL,
  `der` double default NULL,
  `der_last` double default NULL,
  `nd_ebitda` double default NULL,
  `nd_ebitda_ttm` double default NULL,
  `nd_ebitda_last` double default NULL,
  `dpr` double default NULL,
  `roic` double default NULL,
  `roic_ttm` double default NULL,
  `roic_last` double default NULL,
  `peg` double default NULL,
  `peg_ttm` double default NULL,
  `peg_last` double default NULL,
  `pre_peg` double default NULL,
  `pre_peg_ttm` double default NULL,
  `pre_peg_last` double default NULL,
  `time` time default NULL,
  `date` date default NULL,
  PRIMARY KEY  (`insref`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `greeks` (
  `insref` bigint(20) unsigned NOT NULL,
  `iv` double default NULL,
  `ivbid` double default NULL,
  `ivask` double default NULL,
  `delta` double default NULL,
  `gamma` double default NULL,
  `rho` double default NULL,
  `theta` double default NULL,
  `vega` double default NULL,
  `time` time default NULL,
  `date` date default NULL,
  PRIMARY KEY  (`insref`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `newscoding` (
  `newsref` bigint(20) unsigned NOT NULL,
  `newsid` char(36) NOT NULL,
  `isin` char(12) NOT NULL,
  `company` bigint(20) unsigned NOT NULL,
  `date` date default NULL,
  PRIMARY KEY  (`newsid`,`newsref`,`isin`,`company`),
  KEY `newscodingindex` (`isin`,`newsid`),
  KEY `newscodingindex2` (`company`,`newsid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `newstags` (
  `newsref` bigint(20) unsigned NOT NULL,
  `newsid` char(36) NOT NULL,
  `tag` char(30) NOT NULL,
  `date` date NOT NULL,
  PRIMARY KEY  (`newsid`,`newsref`,`tag`),
  KEY `newstagindex` (`tag`,`newsid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `noii` (
  `insref` bigint(20) unsigned NOT NULL,
  `bidprice` double default NULL,
  `askprice` double default NULL,
  `bidquantity` double default NULL,
  `askquantity` double default NULL,
  `lastprice` double default NULL,
  `quantity` double default NULL,
  `imbalance` double default NULL,
  `direction` smallint(5) unsigned NULL,
  `type` smallint(5) unsigned NULL,
  `time` time default NULL,
  `date` date default NULL,
  PRIMARY KEY  (`insref`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `constituents` (
  `insref` bigint(20) unsigned NOT NULL,
  `constituent` bigint(20) unsigned NOT NULL,
  `weight` double default NULL,
  `isin` varchar(12) default NULL,
  `currency` varchar(4) default NULL,
  PRIMARY KEY  (`insref`, `constituent`),
  KEY `constituentsindex` (`constituent`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `ticksize` (
  `insref` bigint(20) unsigned NOT NULL,
  `threshold` double NOT NULL,
  `increment` double NOT NULL,
  PRIMARY KEY  (`insref`, `threshold`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `l10n` (
  `insref` bigint(20) unsigned NOT NULL,
  `language` char(2) NOT NULL,
  `name` varchar(255) default NULL,
  `shortdescription` text default NULL,
  `description` mediumtext default NULL,
  `importantevents` mediumtext default NULL,
  `prospectus` text default NULL,
  `kiid` text default NULL,
  `priipkid` text default NULL,
  `Past_Performance_Link` text default NULL,
  `Previous_Performance_Scenarios_Calculation_Link` text default NULL,
  `sustaindescription` mediumtext default NULL,
  `sustaininvesting1` mediumtext default NULL,
  `sustaininvesting2` mediumtext default NULL,
  `sustaindivesting1` mediumtext default NULL,
  `sustaindivesting2` mediumtext default NULL,
  `sustaininfluence` mediumtext default NULL,
  `sustainmonitoring1` mediumtext default NULL,
  `sustainmonitoring2` mediumtext default NULL,
  `sustaincomment` mediumtext default NULL,
  `Comprehension_Alert_Portfolio` char(1) default NULL,
  `Intended_target_market_retail_investor_Portfolio` varchar(4000) default NULL,
  `Investment_objective_Portfolio` varchar(8000) default NULL,
  `Risk_narrative_Portfolio` varchar(300) default NULL,
  `Other_materially_relevant_risk_narrative_Portfolio` varchar(200) default NULL,
  `Type_of_underlying_Investment_Option` varchar(300) default NULL,
  `Capital_Guarantee` char(1) default NULL,
  `Capital_Guarantee_Level` double default NULL,
  `Capital_Guarantee_Limitations` varchar(300) default NULL,
  `Capital_Guarantee_Early_Exit_Conditions` date default NULL,
  `Capital_guarantee_Portfolio` varchar(2500) default NULL,
  `Possible_maximum_loss_Portfolio` double default NULL,
  `Description_Past_Interval_Unfavourable_Scenario` varchar(300) default NULL,
  `Description_Past_Interval_Moderate_Scenario` varchar(300) default NULL,
  `Description_Past_Interval_Favourable_Scenario` varchar(300) default NULL,
  `Portfolio_Performance_Fees_Narrative` varchar(300) default NULL,
  `Portolio_Carried_Interest_Narrative` varchar(300) default NULL,
  `One_Off_Cost_Portfolio_Entry_Cost_Description` varchar(300) default NULL,
  `One_Off_Cost_Portfolio_Exit_Cost_Description` varchar(300) default NULL,
  `Ongoing_Costs_Portfolio_Management_Costs_Description` varchar(150) default NULL,
  `Cost_Dependence_Explanation` varchar(150) default NULL,
  `Other_comment` text default NULL,
  `date` date default NULL,
  PRIMARY KEY  (`insref`, `language`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `brokers` (
  `insref` bigint(20) unsigned NOT NULL,
  `symbol` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  PRIMARY KEY  (`insref`, `symbol`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `ci` (
  `insref` bigint(20) unsigned NOT NULL,
  `type` smallint(5) unsigned NOT NULL,
  `subtype` smallint(5) unsigned default NULL,
  `sequence` integer unsigned NOT NULL,
  `s1` varchar(255) default NULL,
  `s2` varchar(255) default NULL,
  `s3` varchar(255) default NULL,
  `s4` varchar(255) default NULL,
  `s5` varchar(255) default NULL,
  `s6` varchar(255) default NULL,
  `s7` varchar(255) default NULL,
  `s8` varchar(255) default NULL,
  `s9` varchar(255) default NULL,
  `s10` varchar(255) default NULL,
  `s11` varchar(255) default NULL,
  `s12` varchar(255) default NULL,
  `s13` varchar(255) default NULL,
  `s14` varchar(255) default NULL,
  `s15` varchar(255) default NULL,
  `n1` double default NULL,
  `n2` double default NULL,
  `n3` double default NULL,
  `n4` double default NULL,
  `n5` double default NULL,
  `n6` double default NULL,
  `n7` double default NULL,
  `n8` double default NULL,
  `n9` double default NULL,
  `n10` double default NULL,
  `i1` integer default NULL,
  `i2` integer default NULL,
  `i3` integer default NULL,
  `i4` integer default NULL,
  `i5` integer default NULL,
  `i6` integer default NULL,
  `i7` integer default NULL,
  `i8` integer default NULL,
  `i9` integer default NULL,
  `i10` integer default NULL,
  `insref1` bigint(20) unsigned NULL,
  `insref2` bigint(20) unsigned NULL,
  `insref3` bigint(20) unsigned NULL,
  `insref4` bigint(20) unsigned NULL,
  `insref5` bigint(20) unsigned NULL,
  `d1` date default NULL,
  `d2` date default NULL,
  `d3` date default NULL,
  `eventlink` char(36) default NULL,
  `eventlinklanguages` varchar(255) default NULL,
  `eventstatus` smallint(5) unsigned default NULL,
  `lastmodified` datetime default NULL,
  PRIMARY KEY  (`insref`, `type`, `sequence`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `cihistory` (
  `insref` bigint(20) unsigned NOT NULL,
  `type` smallint(5) unsigned NOT NULL,
  `subtype` smallint(5) unsigned default NULL,
  `sequence` integer unsigned NOT NULL,
  `date` date NOT NULL,
  `s1` varchar(255) default NULL,
  `s2` varchar(255) default NULL,
  `s3` varchar(255) default NULL,
  `s4` varchar(255) default NULL,
  `s5` varchar(255) default NULL,
  `s6` varchar(255) default NULL,
  `s7` varchar(255) default NULL,
  `s8` varchar(255) default NULL,
  `s9` varchar(255) default NULL,
  `s10` varchar(255) default NULL,
  `s11` varchar(255) default NULL,
  `s12` varchar(255) default NULL,
  `s13` varchar(255) default NULL,
  `s14` varchar(255) default NULL,
  `s15` varchar(255) default NULL,
  `n1` double default NULL,
  `n2` double default NULL,
  `n3` double default NULL,
  `n4` double default NULL,
  `n5` double default NULL,
  `n6` double default NULL,
  `n7` double default NULL,
  `n8` double default NULL,
  `n9` double default NULL,
  `n10` double default NULL,
  `i1` integer default NULL,
  `i2` integer default NULL,
  `i3` integer default NULL,
  `i4` integer default NULL,
  `i5` integer default NULL,
  `i6` integer default NULL,
  `i7` integer default NULL,
  `i8` integer default NULL,
  `i9` integer default NULL,
  `i10` integer default NULL,
  `insref1` bigint(20) unsigned NULL,
  `insref2` bigint(20) unsigned NULL,
  `insref3` bigint(20) unsigned NULL,
  `insref4` bigint(20) unsigned NULL,
  `insref5` bigint(20) unsigned NULL,
  `d1` date default NULL,
  `d2` date default NULL,
  `d3` date default NULL,
  `eventlink` char(36) default NULL,
  `eventlinklanguages` varchar(255) default NULL,
  `eventstatus` smallint(5) unsigned default NULL,
  `lastmodified` datetime default NULL,
  PRIMARY KEY  (`insref`, `type`, `sequence`, `date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `priip` (
	`insref` bigint(20) unsigned NOT NULL,
	`EPT_Version` char(3) default NULL,
	`EPT_Producer_Name` varchar(255) default NULL,
	`EPT_Producer_Email` varchar(255) default NULL,
	`File_Generation_Date_And_Time` datetime default NULL,
	`EPT_Data_Reporting_Narratives` char(1) default NULL,
	`EPT_Data_Reporting_Costs` char(1) default NULL,
	`EPT_Data_Reporting_Additional_Requirements_German_MOPs` char(1) default NULL,
	`EPT_Additional_Information_Structured_Products` char(1) default NULL,
	`Portfolio_Issuer_Name` varchar(255) default NULL,
	`Portfolio_Manufacturer_Group_Name` varchar(255) default NULL,
	`Portfolio_Manufacturer_LEI` varchar(20) default NULL,
	`Portfolio_Manufacturer_Email` varchar(255) default NULL,
	`Portfolio_Guarantor_Name` varchar(255) default NULL,
	`Portfolio_Identifying_Data` varchar(255) default NULL,
	`Type_Of_Identification_Code_For_The_Fund_Share_Or_Portfolio` smallint(5) unsigned default NULL,
	`Portfolio_Name` varchar(255) default NULL,
	`Share_Class_Currency` char(3) default NULL,
	`Reference_Date` date default NULL,
	`PRIIPs_KID_Web_Address` text default NULL,
	`Portfolio_PRIIPS_Category` smallint(5) unsigned default NULL,
	`Fund_CIC_code` char(4) default NULL,
	`Is_An_Autocallable_Product` char(1) default NULL,
	`EOS_portfolio` char(1) default NULL,
	`Valuation_Frequency` smallint(5) unsigned default NULL,
	`Portfolio_VEV_Reference` double default NULL,
	`IS_Flexible` char(1) default NULL,
	`Flex_VEV_Historical` double default NULL,
	`Flex_VEV_Ref_Asset_Allocation` double default NULL,
	`IS_Risk_Limit_Relevant` char(1) default NULL,
	`Flex_VEV_Risk_Limit` double default NULL,
	`Existing_Credit_Risk` char(1) default NULL,
	`SRI` smallint(5) unsigned default NULL,
	`IS_SRI_Adjusted` char(1) default NULL,
	`MRM` smallint(5) unsigned default NULL,
	`CRM` smallint(5) unsigned default NULL,
	`Recommended_Holding_Period` double default NULL,
	`Has_A_Contractual_Maturity_Date` char(1) default NULL,
	`Maturity_Date` date default NULL,
	`Liquidity_Risk` char(1) default NULL,
	`Portfolio_return_unfavorable_scenario_1_year` double default NULL,
	`Portfolio_return_unfavorable_scenario_half_RHP` double default NULL,
	`Portfolio_return_unfavorable_scenario_RHP` double default NULL,
	`Autocall_Applied_Unfavourable_Scenario` char(1) default NULL,
	`Autocall_Date_Unfavourable_Scenario` date default NULL,
	`Portfolio_return_moderate_scenario_1_year` double default NULL,
	`Portfolio_return_moderate_scenario_half_RHP` double default NULL,
	`Portfolio_return_moderate_scenario_RHP` double default NULL,
	`Autocall_Applied_Moderate_Scenario` char(1) default NULL,
	`Autocall_Date_Moderate_Scenario` date default NULL,
	`Portfolio_return_favorable_scenario_1_year` double default NULL,
	`Portfolio_return_favorable_scenario_half_RHP` double default NULL,
	`Portfolio_return` double default NULL,
	`Autocall_Applied_Favourable_Scenario` char(1) default NULL,
	`Autocall_Date_Favourable_Scenario` date default NULL,
	`Portfolio_return_stress_scenario_1_year` double default NULL,
	`Portfolio_return_stress_scenario_half_RHP` double default NULL,
	`Portfolio_return_stress_scenario_RHP` double default NULL,
	`Autocall_Applied_Stress_Scenario` char(1) default NULL,
	`Autocall_Date_Stress_Scenario` date default NULL,
	`Portfolio_number_of_observed_return_M0` double default NULL,
	`Portfolio_mean_observed_returns_M1` double default NULL,
	`Portfolio_observed_Sigma` double default NULL,
	`Portfolio_observed_Skewness` double default NULL,
	`Portfolio_observed_Excess_Kurtosis` double default NULL,
	`Portfolio_observed_Stressed_Volatility` double default NULL,
	`Portfolio_Past_Performance_Disclosure_Required` char(1) default NULL,
	`Past_Performance_Link` text default NULL,
	`Previous_Performance_Scenarios_Calculation_Link` text default NULL,
	`Past_Performance_Number_Of_Years` smallint(5) unsigned default NULL,
	`Reference_Invested_Amount` double default NULL,
	`One_off_cost_Portfolio_entry_cost` double default NULL,
	`One_off_cost_Portfolio_entry_cost_Acquired` double default NULL,
	`One_off_costs_Portfolio_exit_cost_at_RHP` double default NULL,
	`One_off_costs_Portfolio_exit_cost_at_1_year` double default NULL,
	`One_off_costs_Portfolio_exit_cost_at_half_RHP` double default NULL,
	`One_off_costs_Portfolio_sliding_exit_cost_Indicator` char(1) default NULL,
	`Ongoing_costs_Portfolio_other_costs` double default NULL,
	`Ongoing_costs_Portfolio_management_costs` double default NULL,
	`Ongoing_costs_Portfolio_transaction_costs` double default NULL,
	`Existing_performance_fees` char(1) default NULL,
	`Incidental_costs_Portfolio_performance_fees` double default NULL,
	`Existing_carried_interest_fees` char(1) default NULL,
	`Incidental_costs_Portfolio_carried_interest` double default NULL,
	`Reference_Language` char(2) default NULL,
	`Comprehension_Alert_Portfolio` char(1) default NULL,
	`Intended_target_market_retail_investor_Portfolio` varchar(4000) default NULL,
	`Investment_objective_Portfolio` varchar(8000) default NULL,
	`Risk_narrative_Portfolio` varchar(300) default NULL,
	`Other_materially_relevant_risk_narrative_Portfolio` varchar(200) default NULL,
	`Type_of_underlying_Investment_Option` varchar(300) default NULL,
	`Capital_Guarantee` char(1) default NULL,
	`Capital_Guarantee_Level` double default NULL,
	`Capital_Guarantee_Limitations` varchar(300) default NULL,
	`Capital_Guarantee_Early_Exit_Conditions` date default NULL,
	`Capital_guarantee_Portfolio` varchar(2500) default NULL,
	`Possible_maximum_loss_Portfolio` double default NULL,
	`Description_Past_Interval_Unfavourable_Scenario` varchar(300) default NULL,
	`Description_Past_Interval_Moderate_Scenario` varchar(300) default NULL,
	`Description_Past_Interval_Favourable_Scenario` varchar(300) default NULL,
	`Was_Benchmark_Used_Performance_Calculation` char(1) default NULL,
	`Portfolio_Performance_Fees_Narrative` varchar(300) default NULL,
	`Portolio_Carried_Interest_Narrative` varchar(300) default NULL,
	`One_Off_Cost_Portfolio_Entry_Cost_Description` varchar(300) default NULL,
	`One_Off_Cost_Portfolio_Exit_Cost_Description` varchar(300) default NULL,
	`Ongoing_Costs_Portfolio_Management_Costs_Description` varchar(150) default NULL,
	`Do_Costs_Depend_On_Invested_Amount` char(1) default NULL,
	`Cost_Dependence_Explanation` varchar(150) default NULL,
	`German_MOPs_Reference_Date` date default NULL,
	`Other_comment` text default NULL,
	`PRIIP_data_delivery` char(1) default NULL,
	`UCITS_data_delivery` char(1) default NULL,
	`Portfolio_UCITS_SRRI` smallint(5) unsigned default NULL,
	`Portfolio_UCITS_Vol` double default NULL,
	`Ongoing_costs_Portfolio_other_costs_UCITS` double default NULL,
	`Ongoing_costs_Portfolio_transaction_costs_UCITS` double default NULL,
	`Transactions_costs_methodology` varchar(255) default NULL,
	`Incidental_costs_Portfolio_performance_fees_UCITS` double default NULL,
	`Incidental_costs_Portfolio_carried_interest_UCITS` double default NULL,
	`UCITS_KID_Web_Address` text default NULL,
	`Bonds_Weight` double default NULL,
	`Annualized_Return_Volatility` double default NULL,
	`Duration_Bonds` double default NULL,
	`Existing_Capital_Preservation` char(1) default NULL,
	`Capital_Preservation_Level` double default NULL,
	`Time_Interval_Maximum_Loss` varchar(10) default NULL,
	`Uses_PI` char(1) default NULL,
	`Multiplier_PI` double default NULL,
	`First_Possible_Call_Date` date default NULL,
	`Total_cost_1_year` double default NULL,
	`RIY_1_year` double default NULL,
	`Total_cost_half_RHP` double default NULL,
	`RIY_half_RHP` double default NULL,
	`Total_cost_RHP` double default NULL,
	`RIY_RHP` double default NULL,
	`One_off_costs_Portfolio_entry_cost_RIY` double default NULL,
	`One_off_costs_Portfolio_exit_cost_RIY` double default NULL,
	`Ongoing_costs_Portfolio_transaction_costs_RIY` double default NULL,
	`Ongoing_costs_Other_ongoing_costs_RIY` double default NULL,
	`Incidental_costs_Portfolio_performance_fees_RIY` double default NULL,
	`Incidental_costs_Portfolio_carried_interests_RIY` double default NULL,
	`p08010` varchar(7) default NULL,
	`p08020` double default NULL,
	`p08030` smallint(5) unsigned default NULL,
	`p08040` double default NULL,
	`p08045` date default NULL,
	`p08050` date default NULL,
	`p08060` text default NULL,
	`p08070` text(2500) default NULL,
	`p08080` text(400) default NULL,
	`p08090` text(4000) default NULL,
	`p08100` text(1000) default NULL,
	`p08110` text(1000) default NULL,
	`p08120` text(1000) default NULL,
	`p08130` text(1000) default NULL,
	`p08140` double default NULL,
	`p08150` date default NULL,
	`p08160` text default NULL,
	`p08170` smallint(5) unsigned default NULL,
	`p08180` double default NULL,
	`p08190` char(1) default NULL,
	`p08200` double default NULL,
	`lastmodified` datetime default NULL,
	PRIMARY KEY  (`insref`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `mifid` (
	`insref` bigint(20) unsigned NOT NULL,
	`fisn` varchar(35) default NULL,
	`lei` char(20) default NULL,
	`EMT_Version` char(4) default NULL,
	`EMT_Producer_Name` varchar(255) default NULL,
	`EMT_Producer_LEI` char(20) default NULL,
	`EMT_Producer_Email` varchar(255) default NULL,
	`File_Generation_Date_and_Time` datetime DEFAULT NULL,
	`EMT_Data_Reporting_Target_Market` char(1) default NULL,
	`EMT_Data_Reporting_ExAnte` char(1) default NULL,
	`EMT_Data_Reporting_ExPost` char(1) default NULL,
	`Financial_Instrument_Identifying_Data` varchar(255) default NULL,
	`Type_Of_Identification_Code_For_The_Financial_Instrument` smallint(5) unsigned default NULL,
	`Financial_Instrument_Name` varchar(255) default NULL,
	`Financial_Instrument_Currency` char(3) default NULL,
	`Financial_Instrument_Performance_Fee` char(1) default NULL,
	`Financial_Instrument_Distribution_Of_Cash` char(1) default NULL,
	`Reporting_Date` date default NULL,
	`Financial_Instrument_Legal_Structure` varchar(2) default NULL,
	`m00065` date default NULL,
	`m00067` char(1) default NULL,
	`Financial_Instrument_Issuer_Name` varchar(255) default NULL,
	`Financial_Instrument_Manufacturer_LEI` varchar(20) default NULL,
	`Financial_Instrument_Manufacturer_Email` varchar(255) default NULL,
	`Financial_Instrument_Manufacturer_Product_Governance_Process` char(1) default NULL,
	`Financial_Instrument_Guarantor_Name` varchar(255) default NULL,
	`Financial_Instrument_Type_Notional_or_Item_Based` char(1) default NULL,
	`Product_Category_or_Nature` varchar(255) default NULL,
	`m00096` char(1) default NULL,
	`Structured_Securities_Product_Category_or_Nature` int unsigned default NULL,
	`Structured_Securities_Quotation` char(1) default NULL,
	`Leveraged_Financial_Instrument_or_Contingent_LiabilityInstrumen` char(1) default NULL,
	`Fund_Share_Class_Without_Retrocession` char(1) default NULL,
	`Ex_Post_Cost_Calculation_Basis_Italy` char(1) default NULL,
	`Target_Market_Reference_Date` date default NULL,
	`Investor_Type_Retail` char(1) default NULL,
	`Investor_Type_Professional` char(1) default NULL,
	`Investor_Type_Eligible_Counterparty` char(1) default NULL,
	`Basic_Investor` char(1) default NULL,
	`Informed_Investor` char(1) default NULL,
	`Advanced_Investor` char(1) default NULL,
	`Expert_Investor_Germany` char(1) default NULL,
	`No_Capital_Loss` char(1) default NULL,
	`Limited_Capital_Loss` char(1) default NULL,
	`Limited_Capital_Loss_Level` double default NULL,
	`No_Capital_Guarantee` char(1) default NULL,
	`Loss_Beyond_Capital` char(1) default NULL,
	`Risk_Tolerance_PRIIPS_Methodology` smallint(5) unsigned default NULL,
	`Risk_Tolerance_UCITS_Metholodology` smallint(5) unsigned default NULL,
	`Risk_Tolerance_Internal_Methodology_For_Non_PRIIPS_and_NonUCITS` char(1) default NULL,
	`Risk_Tolerance_For_Non_PRIIPS_and_Non_UCITS_Spain` smallint(5) unsigned default NULL,
	`Not_For_Investors_With_The_Lowest_Risk_Tolerance_Germany` char(1) default NULL,
	`Return_Profile_Preservation` char(1) default NULL,
	`Return_Profile_Growth` char(1) default NULL,
	`Return_Profile_Income` char(1) default NULL,
	`Return_Profile_Hedging` char(1) default NULL,
	`Option_or_Leveraged_Return_Profile` char(1) default NULL,
	`Return_Profile_Other` char(1) default NULL,
	`Return_Profile_Pension_Scheme_Germany` char(1) default NULL,
	`Time_Horizon1` char(1) default NULL,
	`Time_Horizon2` double default NULL,
	`m05090` date default NULL,
	`Maturity_Date` date default NULL,
	`May_Be_Terminated_Early` char(1) default NULL,
	`Intended_Compatible_With_Clients_Having_ESG_Preferences` char(1) default NULL,
	`Specific_Investment_Need` char(1) default NULL,
	`Other_Specific_Investment_Need` char(1) default NULL,
	`Execution_Only` char(1) default NULL,
	`Execution_With_Appropriateness_Test_Or_Non_Advised_Services` char(1) default NULL,
	`Investment_Advice` char(1) default NULL,
	`Portfolio_Management` char(1) default NULL,
	`OO_Financial_Instrument_entry_cost` double default NULL,
	`Net_OO_cost_Financial_Instrument_entry_cost_non_acquired` double default NULL,
	`OO_Financial_Instrument_maximum_entry_cost_fixed_amount_Italy` double default NULL,
	`OO_Financial_Instrument_maximum_entry_cost_acquired` double default NULL,
	`OO_Financial_Instrument_maximum_exit_cost` double default NULL,
	`OO_Financial_Instrument_maximum_exit_cost_fixed_amount_Italy` double default NULL,
	`OO_Financial_Instrument_maximum_exit_cost_acquired` double default NULL,
	`OO_Financial_Instrument_Typical_exit_cost` double default NULL,
	`OO_Financial_Instrument_exit_cost_structrd_securities_prior_RHP` double default NULL,
	`Financial_Instrument_Ongoing_costs` double default NULL,
	`Financial_Instrument_Gearing_costs_ex_ante_UK` double default NULL,
	`Financial_Instrument_Management_fee` double default NULL,
	`Financial_Instrument_Distribution_fee` double default NULL,
	`Financial_Instrument_Transaction_costs_ex_ante` double default NULL,
	`Financial_Instrument_Incidental_costs_ex_ante` double default NULL,
	`Structured_Securities_Reference_Price_ex_ante` double default NULL,
	`Structured_Securities_Notional_Reference_Amount_ex_ante` double default NULL,
	`Ex_Ante_Costs_Reference_Date` date default NULL,
	`OO_Structured_Securities_entry_cost_ex_post` double default NULL,
	`Net_OO_cost_Structured_Securities_entry_cost_ex_post` double default NULL,
	`OO_Structured_Securities_exit_cost_ex_post` double default NULL,
	`OO_cost_Financial_Instrument_entry_cost_acquired` double default NULL,
	`Financial_Instrument_Ongoing_costs_ex_post` double default NULL,
	`Structured_Securities_Ongoing_costs_ex_post_accumulated` double default NULL,
	`Financial_Instrument_Borrowing_Costs_Ex_Post_UK` double default NULL,
	`Financial_Instrument_Management_fee_ex_post` double default NULL,
	`Financial_Instrument_Distribution_fee_ex_post` double default NULL,
	`Financial_Instrument_Transaction_costs_ex_post` double default NULL,
	`Financial_Instrument_Incidental_costs_ex_post` double default NULL,
	`Beginning_Of_Calculation_Period` date default NULL,
	`End_Of_Calculation_Period` date default NULL,
	`Structured_Securities_Reference_Price_ex_post` double default NULL,
	`Structured_Securities_Notional_Reference_Amount` double default NULL,
	`m09010` double default NULL,
	`m09020` double default NULL,
	`m09030` char(1) default NULL,
	`m09040` char(1) default NULL,
	`m09050` char(1) default NULL,
	`m09060` char(1) default NULL,
	`m09070` char(1) default NULL,
	`m09080` text default NULL,
	`m09090` date default NULL,
	`m09100` date default NULL,
	`m10000` double default NULL,
	`m10010` double default NULL,
	`m10020` double default NULL,
	`m10030` double default NULL,
	`m10040` double default NULL,
	`m10050` double default NULL,
	`m10060` char(1) default NULL,
	`lastmodified` datetime default NULL,
	PRIMARY KEY  (`insref`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `mifidhistory` (
	`insref` bigint(20) unsigned NOT NULL,
	`Reporting_Date` date NOT NULL,
	`OO_Structured_Securities_entry_cost_ex_post` double default NULL,
	`Net_OO_cost_Structured_Securities_entry_cost_ex_post` double default NULL,
	`OO_Structured_Securities_exit_cost_ex_post` double default NULL,
	`OO_cost_Financial_Instrument_entry_cost_acquired` double default NULL,
	`Financial_Instrument_Ongoing_costs_ex_post` double default NULL,
	`Structured_Securities_Ongoing_costs_ex_post_accumulated` double default NULL,
	`Financial_Instrument_Borrowing_Costs_Ex_Post_UK` double default NULL,
	`Financial_Instrument_Management_fee_ex_post` double default NULL,
	`Financial_Instrument_Distribution_fee_ex_post` double default NULL,
	`Financial_Instrument_Transaction_costs_ex_post` double default NULL,
	`Financial_Instrument_Incidental_costs_ex_post` double default NULL,
	`Beginning_Of_Calculation_Period` date default NULL,
	`End_Of_Calculation_Period` date default NULL,
	`Structured_Securities_Reference_Price_ex_post` double default NULL,
	`Structured_Securities_Notional_Reference_Amount` double default NULL,
	`lastmodified` datetime default NULL,
	PRIMARY KEY  (`insref`, `Reporting_Date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `underlyings` (
	`insref` bigint(20) unsigned NOT NULL,
	`isin` varchar(12) NOT NULL,
	`currency` varchar(4) default NULL,
	PRIMARY KEY  (`insref`, `isin`),
	KEY `underlyingsindex` (`isin`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `sectors` (
	`insref` bigint(20) unsigned NOT NULL,
	`sector` bigint(20) unsigned NOT NULL,
	`marketplace` bigint(20) unsigned NOT NULL,
	PRIMARY KEY  (`insref`, `sector`),
	KEY `sectorsindex` (`sector`, `marketplace`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `combolegs` (
  `insref` bigint(20) unsigned NOT NULL,
  `leg` bigint(20) unsigned NOT NULL,
  `ratio` int(10) default NULL,
  `side` smallint(5) unsigned default NULL,
  PRIMARY KEY (`insref`, `leg`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `aggtrades` (
  `insref` bigint(20) unsigned NOT NULL,
  `openprice` double default NULL,
  `highprice` double default NULL,
  `lowprice` double default NULL,
  `closeprice` double default NULL,
  `openyield` double default NULL,
  `highyield` double default NULL,
  `lowyield` double default NULL,
  `closeyield` double default NULL,
  `quantity` double default NULL,
  `turnover` double default NULL,
  `time` datetime NOT NULL,
  PRIMARY KEY (`insref`, `time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE IF NOT EXISTS `eet` (
	`insref` bigint(20) unsigned NOT NULL,
	`date` date NOT NULL,
	`e00010` char(6) default NULL,
	`e00020` varchar(255) default NULL,
	`e00030` varchar(255) default NULL,
	`e00040` varchar(255) default NULL,
	`e00050` datetime DEFAULT NULL,
	`e00060` char(1) default NULL,
	`e00070` char(1) default NULL,
	`e00080` char(1) default NULL,
	`e00090` char(1) default NULL,
	`e00100` char(1) default NULL,
	`e10000` varchar(255) default NULL,
	`e10010` char(1) default NULL,
	`e10020` varchar(255) default NULL,
	`e10030` varchar(255) default NULL,
	`e10040` date default NULL,
	`e11000` char(1) default NULL,
	`e11011` double default NULL,
	`e11020` char(1) default NULL,
	`e11030` char(1) default NULL,
	`e11040` varchar(50) default NULL,
	`e12000` varchar(50) default NULL,
	`e13000` varchar(255) default NULL,
	`e20000` varchar(255) default NULL,
	`e20010` smallint(5) unsigned default NULL,
	`e20020` varchar(255) default NULL,
	`e20030` char(3) default NULL,
	`e20040` smallint(5) unsigned default NULL,
	`e20050` smallint(5) unsigned default NULL,
	`e20060` varchar(50) default NULL,
	`e20070` double default NULL,
	`e20080` double default NULL,
	`e20090` varchar(2) default NULL,
	`e20100` char(1) default NULL,
	`e20110` text default NULL,
	`e20120` text default NULL,
	`e20130` text default NULL,
	`e20140` text default NULL,
	`e20150` date default NULL,
	`e20160` text default NULL,
	`e20170` char(1) default NULL,
	`e20180` double default NULL,
	`e20190` char(1) default NULL,
	`e20200` char(1) default NULL,
	`e20210` char(1) default NULL,
	`e20220` double default NULL,
	`e20230` char(1) default NULL,
	`e20240` char(1) default NULL,
	`e20250` double default NULL,
	`e20260` char(1) default NULL,
	`e20270` varchar(50) default NULL,
	`e20280` varchar(50) default NULL,
	`e20290` varchar(50) default NULL,
	`e20300` varchar(50) default NULL,
	`e20310` double default NULL,
	`e20320` smallint(5) unsigned default NULL,
	`e20330` double default NULL,
	`e20340` smallint(5) unsigned default NULL,
	`e20350` double default NULL,
	`e20360` smallint(5) unsigned default NULL,
	`e20370` char(1) default NULL,
	`e20380` varchar(500) default NULL,
	`e20390` date default NULL,
	`e20400` double default NULL,
	`e20410` varchar(50) default NULL,
	`e20420` double default NULL,
	`e20430` double default NULL,
	`e20440` double default NULL,
	`e20450` double default NULL,
	`e20460` double default NULL,
	`e20470` double default NULL,
	`e20480` date default NULL,
	`e20490` double default NULL,
	`e20500` double default NULL,
	`e20510` double default NULL,
	`e20520` double default NULL,
	`e20530` double default NULL,
	`e20540` double default NULL,
	`e20550` double default NULL,
	`e20560` double default NULL,
	`e20570` char(1) default NULL,
	`e20580` char(1) default NULL,
	`e20590` char(1) default NULL,
	`e20600` double default NULL,
	`e20610` double default NULL,
	`e20620` char(1) default NULL,
	`e20630` char(1) default NULL,
	`e20640` double default NULL,
	`e20650` double default NULL,
	`e20660` double default NULL,
	`e20670` double default NULL,
	`e20680` double default NULL,
	`e20690` double default NULL,
	`e20700` double default NULL,
	`e20710` double default NULL,
	`e20721` double default NULL,
	`e20731` double default NULL,
	`e20741` double default NULL,
	`e20751` double default NULL,
	`e20761` double default NULL,
	`e20771` double default NULL,
	`e20780` double default NULL,
	`e20790` double default NULL,
	`e30000` char(1) default NULL,
	`e30010` date default NULL,
	`e30020` double default NULL,
	`e30030` char(1) default NULL,
	`e30040` double default NULL,
	`e30050` double default NULL,
	`e30060` double default NULL,
	`e30070` char(1) default NULL,
	`e30080` double default NULL,
	`e30090` double default NULL,
	`e30100` double default NULL,
	`e30110` char(1) default NULL,
	`e30120` double default NULL,
	`e30130` double default NULL,
	`e30140` double default NULL,
	`e30150` char(1) default NULL,
	`e30160` double default NULL,
	`e30170` double default NULL,
	`e30180` double default NULL,
	`e30190` char(1) default NULL,
	`e30200` double default NULL,
	`e30210` double default NULL,
	`e30220` double default NULL,
	`e30230` char(1) default NULL,
	`e30240` double default NULL,
	`e30250` double default NULL,
	`e30260` double default NULL,
	`e30270` char(1) default NULL,
	`e30280` double default NULL,
	`e30290` double default NULL,
	`e30300` double default NULL,
	`e30310` char(1) default NULL,
	`e30320` double default NULL,
	`e30330` double default NULL,
	`e30340` double default NULL,
	`e30350` char(1) default NULL,
	`e30360` double default NULL,
	`e30370` double default NULL,
	`e30380` double default NULL,
	`e30390` char(1) default NULL,
	`e30400` double default NULL,
	`e30410` double default NULL,
	`e30420` double default NULL,
	`e30430` char(1) default NULL,
	`e30440` double default NULL,
	`e30450` double default NULL,
	`e30460` double default NULL,
	`e30470` char(1) default NULL,
	`e30480` double default NULL,
	`e30490` double default NULL,
	`e30500` double default NULL,
	`e30510` char(1) default NULL,
	`e30520` double default NULL,
	`e30530` double default NULL,
	`e30540` double default NULL,
	`e30550` char(1) default NULL,
	`e30560` double default NULL,
	`e30570` double default NULL,
	`e30580` double default NULL,
	`e30590` char(1) default NULL,
	`e30600` double default NULL,
	`e30610` double default NULL,
	`e30620` double default NULL,
	`e30630` char(1) default NULL,
	`e30640` double default NULL,
	`e30650` double default NULL,
	`e30660` double default NULL,
	`e30670` char(1) default NULL,
	`e30680` double default NULL,
	`e30690` double default NULL,
	`e30700` double default NULL,
	`e30710` char(1) default NULL,
	`e30720` double default NULL,
	`e30730` double default NULL,
	`e30740` double default NULL,
	`e30750` char(1) default NULL,
	`e30760` double default NULL,
	`e30770` double default NULL,
	`e30780` double default NULL,
	`e30790` char(1) default NULL,
	`e30800` double default NULL,
	`e30810` double default NULL,
	`e30820` double default NULL,
	`e30830` char(1) default NULL,
	`e30840` double default NULL,
	`e30850` double default NULL,
	`e30860` double default NULL,
	`e30870` char(1) default NULL,
	`e30880` double default NULL,
	`e30890` double default NULL,
	`e30900` double default NULL,
	`e30910` char(1) default NULL,
	`e30920` double default NULL,
	`e30930` double default NULL,
	`e30940` double default NULL,
	`e30950` char(1) default NULL,
	`e30960` double default NULL,
	`e30970` double default NULL,
	`e30980` double default NULL,
	`e30990` char(1) default NULL,
	`e31000` double default NULL,
	`e31010` double default NULL,
	`e31020` double default NULL,
	`e31030` char(1) default NULL,
	`e31040` double default NULL,
	`e31045` double default NULL,
	`e31050` double default NULL,
	`e31060` char(1) default NULL,
	`e31070` double default NULL,
	`e31080` double default NULL,
	`e31090` double default NULL,
	`e31100` char(1) default NULL,
	`e31110` double default NULL,
	`e31120` double default NULL,
	`e31130` double default NULL,
	`e31140` char(1) default NULL,
	`e31150` double default NULL,
	`e31160` double default NULL,
	`e31170` double default NULL,
	`e31180` char(1) default NULL,
	`e31190` double default NULL,
	`e31200` double default NULL,
	`e31210` smallint(5) unsigned default NULL,
	`e31220` char(1) default NULL,
	`e31230` double default NULL,
	`e31240` double default NULL,
	`e31250` double default NULL,
	`e31260` char(1) default NULL,
	`e31270` double default NULL,
	`e31280` double default NULL,
	`e31290` double default NULL,
	`e31300` char(1) default NULL,
	`e31310` double default NULL,
	`e31320` double default NULL,
	`e31330` double default NULL,
	`e31340` char(1) default NULL,
	`e31350` double default NULL,
	`e31360` double default NULL,
	`e31370` double default NULL,
	`e31380` char(1) default NULL,
	`e31390` double default NULL,
	`e31400` double default NULL,
	`e31410` double default NULL,
	`e31420` char(1) default NULL,
	`e31430` double default NULL,
	`e31440` double default NULL,
	`e31450` double default NULL,
	`e31460` char(1) default NULL,
	`e31470` double default NULL,
	`e31480` double default NULL,
	`e31490` double default NULL,
	`e31500` char(1) default NULL,
	`e31505` double default NULL,
	`e31510` double default NULL,
	`e31520` double default NULL,
	`e31530` char(1) default NULL,
	`e31540` double default NULL,
	`e31550` double default NULL,
	`e31560` double default NULL,
	`e31570` char(1) default NULL,
	`e31580` double default NULL,
	`e31590` double default NULL,
	`e31600` double default NULL,
	`e31610` char(1) default NULL,
	`e31620` double default NULL,
	`e31630` double default NULL,
	`e31640` double default NULL,
	`e31650` char(1) default NULL,
	`e31660` double default NULL,
	`e31670` double default NULL,
	`e31671` double default NULL,
	`e31672` char(1) default NULL,
	`e31673` double default NULL,
	`e31674` double default NULL,
	`e31680` double default NULL,
	`e31690` char(1) default NULL,
	`e31700` double default NULL,
	`e31710` double default NULL,
	`e31720` double default NULL,
	`e31730` char(1) default NULL,
	`e31740` double default NULL,
	`e31750` double default NULL,
	`e31760` double default NULL,
	`e31770` char(1) default NULL,
	`e31780` double default NULL,
	`e31790` double default NULL,
	`e31800` double default NULL,
	`e31810` char(1) default NULL,
	`e31820` double default NULL,
	`e31830` double default NULL,
	`e31840` double default NULL,
	`e31850` char(1) default NULL,
	`e31860` double default NULL,
	`e31870` double default NULL,
	`e31871` double default NULL,
	`e31872` char(1) default NULL,
	`e31873` double default NULL,
	`e31874` double default NULL,
	`e31875` double default NULL,
	`e31876` char(1) default NULL,
	`e31877` double default NULL,
	`e31878` double default NULL,
	`e31880` double default NULL,
	`e31890` char(1) default NULL,
	`e31900` double default NULL,
	`e31910` double default NULL,
	`e31920` double default NULL,
	`e31930` char(1) default NULL,
	`e31940` double default NULL,
	`e31950` double default NULL,
	`e31960` double default NULL,
	`e31970` char(1) default NULL,
	`e31980` double default NULL,
	`e31990` double default NULL,
	`e32000` double default NULL,
	`e32010` char(1) default NULL,
	`e32020` double default NULL,
	`e32030` double default NULL,
	`e32040` double default NULL,
	`e32050` char(1) default NULL,
	`e32060` double default NULL,
	`e32070` double default NULL,
	`e32080` double default NULL,
	`e32090` char(1) default NULL,
	`e32100` double default NULL,
	`e32110` double default NULL,
	`e32120` double default NULL,
	`e32130` char(1) default NULL,
	`e32140` double default NULL,
	`e32150` double default NULL,
	`e32160` double default NULL,
	`e32170` char(1) default NULL,
	`e32180` double default NULL,
	`e32190` double default NULL,
	`e32200` double default NULL,
	`e32210` char(1) default NULL,
	`e32220` double default NULL,
	`e32230` double default NULL,
	`e32240` double default NULL,
	`e32250` char(1) default NULL,
	`e32260` double default NULL,
	`e32270` double default NULL,
	`e32280` double default NULL,
	`e32290` char(1) default NULL,
	`e32300` double default NULL,
	`e32310` double default NULL,
	`e32320` double default NULL,
	`e32330` char(1) default NULL,
	`e32340` double default NULL,
	`e32350` double default NULL,
	`e32360` double default NULL,
	`e32370` char(1) default NULL,
	`e32380` double default NULL,
	`e32390` double default NULL,
	`e32400` double default NULL,
	`e32410` char(1) default NULL,
	`e32420` double default NULL,
	`e32430` double default NULL,
	`e32440` double default NULL,
	`e32450` char(1) default NULL,
	`e32460` double default NULL,
	`e32470` double default NULL,
	`e32480` double default NULL,
	`e32490` char(1) default NULL,
	`e32500` double default NULL,
	`e32510` double default NULL,
	`e32520` double default NULL,
	`e32530` char(1) default NULL,
	`e32540` double default NULL,
	`e32550` double default NULL,
	`e32560` double default NULL,
	`e32570` char(1) default NULL,
	`e32580` double default NULL,
	`e32590` double default NULL,
	`e32640` double default NULL,
	`e32650` char(1) default NULL,
	`e32660` double default NULL,
	`e32670` double default NULL,
	`e32680` double default NULL,
	`e32690` char(1) default NULL,
	`e32700` double default NULL,
	`e32710` double default NULL,
	`e32720` double default NULL,
	`e32730` char(1) default NULL,
	`e32740` double default NULL,
	`e32750` double default NULL,
	`e32760` double default NULL,
	`e32770` char(1) default NULL,
	`e32780` double default NULL,
	`e32790` double default NULL,
	`e32800` double default NULL,
	`e32810` char(1) default NULL,
	`e32820` double default NULL,
	`e32830` double default NULL,
	`e32840` double default NULL,
	`e32850` char(1) default NULL,
	`e32860` double default NULL,
	`e32870` double default NULL,
	`e32880` double default NULL,
	`e32890` char(1) default NULL,
	`e32900` double default NULL,
	`e32910` double default NULL,
	`e32920` double default NULL,
	`e32930` char(1) default NULL,
	`e32940` double default NULL,
	`e32950` double default NULL,
	`e32960` double default NULL,
	`e32970` char(1) default NULL,
	`e32980` double default NULL,
	`e32990` double default NULL,
	`e33000` double default NULL,
	`e33010` char(1) default NULL,
	`e33020` double default NULL,
	`e33030` double default NULL,
	`e33040` double default NULL,
	`e33050` char(1) default NULL,
	`e33060` double default NULL,
	`e33070` double default NULL,
	`e33080` double default NULL,
	`e33090` char(1) default NULL,
	`e33100` double default NULL,
	`e33110` double default NULL,
	`e33120` double default NULL,
	`e33130` char(1) default NULL,
	`e33140` double default NULL,
	`e33145` double default NULL,
	`e33150` double default NULL,
	`e33160` char(1) default NULL,
	`e33170` double default NULL,
	`e33180` double default NULL,
	`e33190` double default NULL,
	`e33200` char(1) default NULL,
	`e33210` double default NULL,
	`e33220` double default NULL,
	`e33230` double default NULL,
	`e33240` char(1) default NULL,
	`e33250` double default NULL,
	`e33260` double default NULL,
	`e33265` double default NULL,
	`e33270` char(1) default NULL,
	`e33280` double default NULL,
	`e33290` double default NULL,
	`e33295` double default NULL,
	`e33300` char(1) default NULL,
	`e33310` double default NULL,
	`e33320` double default NULL,
	`e33330` double default NULL,
	`e33340` char(1) default NULL,
	`e33350` double default NULL,
	`e33360` double default NULL,
	`e33370` double default NULL,
	`e33380` char(1) default NULL,
	`e33390` double default NULL,
	`e33400` double default NULL,
	`e33410` double default NULL,
	`e33420` char(1) default NULL,
	`e33430` double default NULL,
	`e33440` double default NULL,
	`e40000` char(1) default NULL,
	`e40010` text default NULL,
	`e50100` char(1) default NULL,
	`e50110` char(1) default NULL,
	`e50120` double default NULL,
	`e50130` varchar(3) default NULL,
	`e50200` char(1) default NULL,
	`e50210` char(1) default NULL,
	`e50220` double default NULL,
	`e50230` varchar(3) default NULL,
	`e50300` char(1) default NULL,
	`e50310` char(1) default NULL,
	`e50320` double default NULL,
	`e50330` varchar(3) default NULL,
	`e50400` char(1) default NULL,
	`e50410` char(1) default NULL,
	`e50420` double default NULL,
	`e50430` varchar(3) default NULL,
	`e50500` char(1) default NULL,
	`e50510` char(1) default NULL,
	`e50520` double default NULL,
	`e50530` varchar(3) default NULL,
	`e50600` char(1) default NULL,
	`e50610` char(1) default NULL,
	`e50620` double default NULL,
	`e50630` varchar(3) default NULL,
	`e50640` double default NULL,
	`e50650` double default NULL,
	`e50660` char(1) default NULL,
	`e50700` char(1) default NULL,
	`e50710` char(1) default NULL,
	`e50720` double default NULL,
	`e50730` varchar(3) default NULL,
	`e50800` char(1) default NULL,
	`e50810` char(1) default NULL,
	`e50820` double default NULL,
	`e50830` varchar(3) default NULL,
	`e50900` char(1) default NULL,
	`e50910` char(1) default NULL,
	`e50920` double default NULL,
	`e50930` varchar(3) default NULL,
	`e51000` char(1) default NULL,
	`e51010` char(1) default NULL,
	`e51020` double default NULL,
	`e51030` varchar(3) default NULL,
	`e51040` double default NULL,
	`e51050` double default NULL,
	`e51060` char(1) default NULL,
	`e51100` char(1) default NULL,
	`e51110` char(1) default NULL,
	`e51120` double default NULL,
	`e51130` varchar(3) default NULL,
	`e51200` char(1) default NULL,
	`e51210` char(1) default NULL,
	`e51220` double default NULL,
	`e51230` varchar(3) default NULL,
	`e51300` char(1) default NULL,
	`e51310` char(1) default NULL,
	`e51320` double default NULL,
	`e51400` char(1) default NULL,
	`e51410` char(1) default NULL,
	`e51420` double default NULL,
	`e51430` varchar(3) default NULL,
	`e51500` char(1) default NULL,
	`e51510` char(1) default NULL,
	`e51520` double default NULL,
	`e51530` varchar(3) default NULL,
	`e51540` double default NULL,
	`e51550` double default NULL,
	`e51560` char(1) default NULL,
	`e51600` char(1) default NULL,
	`e51610` char(1) default NULL,
	`e51620` double default NULL,
	`e51630` varchar(3) default NULL,
	`e51640` double default NULL,
	`e51650` double default NULL,
	`e51660` char(1) default NULL,
	`e51700` char(1) default NULL,
	`e51710` char(1) default NULL,
	`e51720` double default NULL,
	`e51730` varchar(3) default NULL,
	`e51800` char(1) default NULL,
	`e51810` char(1) default NULL,
	`e51820` double default NULL,
	`e51830` varchar(3) default NULL,
	`e51900` char(1) default NULL,
	`e51910` char(1) default NULL,
	`e51920` double default NULL,
	`e51930` varchar(3) default NULL,
	`e52000` char(1) default NULL,
	`e52010` char(1) default NULL,
	`e52020` double default NULL,
	`e52030` varchar(3) default NULL,
	`e52100` char(1) default NULL,
	`e52110` char(1) default NULL,
	`e52120` double default NULL,
	`e52130` varchar(3) default NULL,
	`e52200` char(1) default NULL,
	`e52210` char(1) default NULL,
	`e52220` char(1) default NULL,
	`e53000` char(1) default NULL,
	`e53010` char(1) default NULL,
	`e53020` char(1) default NULL,
	`e53030` char(1) default NULL,
	`e53040` char(1) default NULL,
	`e53050` char(1) default NULL,
	`e53060` char(1) default NULL,
	`e54000` char(1) default NULL,
	`e54010` char(1) default NULL,
	`e54020` char(1) default NULL,
	`e54030` char(1) default NULL,
	`e54040` char(1) default NULL,
	`e54050` char(1) default NULL,
	`e54060` char(1) default NULL,
	`e54070` char(1) default NULL,
	`e60400` smallint(5) unsigned default NULL,
	`e60410` varchar(50) default NULL,
	`e60420` varchar(50) default NULL,
	`e60430` varchar(50) default NULL,
	`e60440` varchar(50) default NULL,
	`e70000` char(1) default NULL,
	`e70010` double default NULL,
	`e80000` char(1) default NULL,
	`e80010` char(1) default NULL,
	`e80020` double default NULL,
	`e80030` double default NULL,
	`e80040` double default NULL,
	`e80050` double default NULL,
	`e90000` char(1) default NULL,
	`e90010` double default NULL,
	`e90020` double default NULL,
	`e90030` char(1) default NULL,
	`e90040` double default NULL,
	`e90050` double default NULL,
	`e90060` double default NULL,
	`e90070` double default NULL,
	`e90080` double default NULL,
	`e90090` double default NULL,
	`e90100` double default NULL,
	`e90110` double default NULL,
	`e90120` double default NULL,
	`e90130` double default NULL,
	`e90140` double default NULL,
	`e90150` double default NULL,
	`e90160` double default NULL,
	`e90170` double default NULL,
	`e90180` double default NULL,
	`e90190` double default NULL,
	`e90200` double default NULL,
	`e90210` double default NULL,
	`e90220` double default NULL,
	`e90230` double default NULL,
	`e90240` double default NULL,
	`e90250` double default NULL,
	`e100000` text default NULL,
	`e100010` text default NULL,
	`lastmodified` datetime NOT NULL,
	PRIMARY KEY  (`insref`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
