Datasets:
DenyTranDFW
commited on
Commit
•
81a0350
1
Parent(s):
a65cf33
Upload 21 files
Browse files- dataset-previous-life-info/bs-cf-is-tests.sql +72 -0
- dataset-previous-life-info/bs-cf-is-tests/bs-cf-is-test1/bsTest_1.png +3 -0
- dataset-previous-life-info/bs-cf-is-tests/bs-cf-is-test1/cfTest_1.png +3 -0
- dataset-previous-life-info/bs-cf-is-tests/bs-cf-is-test1/isTest_1.png +3 -0
- dataset-previous-life-info/bs-cf-is-tests/bs-cf-is-test2/bsTest_2.png +3 -0
- dataset-previous-life-info/bs-cf-is-tests/bs-cf-is-test2/cfTest_2.png +3 -0
- dataset-previous-life-info/bs-cf-is-tests/bs-cf-is-test2/isTest_2.png +3 -0
- dataset-previous-life-info/bs-cf-is-tests/bs-cf-is-test3/bsTest_3.png +3 -0
- dataset-previous-life-info/bs-cf-is-tests/bs-cf-is-test3/cfTest_3.png +3 -0
- dataset-previous-life-info/bs-cf-is-tests/bs-cf-is-test3/isTest_3.png +3 -0
- dataset-previous-life-info/bs-cf-is-tests/bs-cf-is-test4/bsTest_4.png +3 -0
- dataset-previous-life-info/bs-cf-is-tests/bs-cf-is-test4/cfTest_4.png +3 -0
- dataset-previous-life-info/bs-cf-is-tests/bs-cf-is-test4/isTest_4.png +3 -0
- dataset-previous-life-info/bs-explain.jpg +3 -0
- dataset-previous-life-info/bs-stats.png +3 -0
- dataset-previous-life-info/cf-explain.jpg +3 -0
- dataset-previous-life-info/cf-stats.png +3 -0
- dataset-previous-life-info/is-explain.jpg +3 -0
- dataset-previous-life-info/is-stats.png +3 -0
- dataset-previous-life-info/mssql-pk-fk.tsv +22 -0
- dataset-previous-life-info/row_count.tsv +26 -0
dataset-previous-life-info/bs-cf-is-tests.sql
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
USE secfsds;
|
2 |
+
SET STATISTICS IO ON;
|
3 |
+
SET STATISTICS TIME ON;
|
4 |
+
GO
|
5 |
+
|
6 |
+
/*
|
7 |
+
(1) '0000320193-20-000096'
|
8 |
+
(2) '0000950170-23-035122'
|
9 |
+
(3) '0001564590-21-039151'
|
10 |
+
(4) '0000320193-23-000106'
|
11 |
+
*/
|
12 |
+
|
13 |
+
DECLARE @stmt VARCHAR(5) = 'BS'; -- CF/IS/BS
|
14 |
+
|
15 |
+
DECLARE @qtrs INT = IIF(@stmt='CF' OR @stmt='IS', 4, 0)
|
16 |
+
DECLARE @adsh VARCHAR(20) = '0000950170-23-035122';
|
17 |
+
DECLARE @form VARCHAR(20) = '10-K';
|
18 |
+
DECLARE @menucat VARCHAR(1) = 'S';
|
19 |
+
DECLARE @fp VARCHAR(2) = 'FY';
|
20 |
+
DECLARE @cfStart VARCHAR(50) = 'periodStartLabel';
|
21 |
+
DECLARE @cfEnd VARCHAR(50) = 'periodEndLabel';
|
22 |
+
DECLARE @inpth INT = 0; DECLARE @iprx INT = 0; DECLARE @value INT = 0;
|
23 |
+
|
24 |
+
SELECT [plabel],[uom]
|
25 |
+
, IIF(
|
26 |
+
NOT CHARINDEX('PerShare', [tag]) > 0
|
27 |
+
,FORMAT([value], '#,##0')
|
28 |
+
,FORMAT([value], '#,##0.00')
|
29 |
+
) AS [value]
|
30 |
+
FROM (
|
31 |
+
SELECT
|
32 |
+
dd.[ddate],
|
33 |
+
prn.[plabel]
|
34 |
+
,t.[tag]
|
35 |
+
,n.[uom]
|
36 |
+
,IIF(
|
37 |
+
prn.[negating]=1,
|
38 |
+
n.[value]*-1,
|
39 |
+
n.[value]
|
40 |
+
) AS [value]
|
41 |
+
,prn.[report],prn.[line]
|
42 |
+
FROM [secfsds].[dbo].[sub] s
|
43 |
+
INNER JOIN [secfsds].[dbo].[num] n
|
44 |
+
ON s.[subID]=n.[subID]
|
45 |
+
INNER JOIN (
|
46 |
+
SELECT
|
47 |
+
p.[subID] ,p.[report] ,p.[line] ,p.[tagID]
|
48 |
+
,p.[fsndsID] ,p.[inpth] ,p.[negating]
|
49 |
+
,p.[prole] ,p.[plabel] ,p.[stmt]
|
50 |
+
,r.[ultparentrpt] ,r.[parentreport]
|
51 |
+
,r.[longname] ,r.[menucat] ,r.[parentroleuri]
|
52 |
+
FROM [secfsds].[dbo].[pre] p
|
53 |
+
INNER JOIN [secfsds].[dbo].[ren] r
|
54 |
+
ON r.[subID]=p.[subID] AND r.[report]=p.[report]
|
55 |
+
WHERE p.[inpth]=@inpth
|
56 |
+
AND p.[stmt]=@stmt
|
57 |
+
) AS prn
|
58 |
+
ON prn.[subID]=n.[subID] AND prn.[tagID]=n.[tagID]
|
59 |
+
INNER JOIN [secfsds].[dbo].[ddate] dd
|
60 |
+
ON dd.[ddateID]=n.[ddateID]
|
61 |
+
INNER JOIN [secfsds].[dbo].[dim] d
|
62 |
+
ON d.[dimID]=n.[dimID]
|
63 |
+
INNER JOIN [secfsds].[dbo].[tag] t
|
64 |
+
ON t.[tagID]=n.[tagID]
|
65 |
+
WHERE prn.[menucat]=@menucat
|
66 |
+
AND d.[dimh]='0x00000000' AND s.[adsh]=@adsh
|
67 |
+
AND n.[iprx]=@iprx AND s.[fp]=@fp AND s.[form]=@form
|
68 |
+
AND [value] IS NOT NULL AND [value] != @value
|
69 |
+
AND (n.[qtrs]=@qtrs OR prn.[prole] IN (@cfStart, @cfEnd))
|
70 |
+
AND dd.[ddate] = CONCAT(s.[fy],RIGHT(CONCAT('0', s.[fye]), 4))
|
71 |
+
) subquery
|
72 |
+
ORDER BY [ddate],[report],[line];
|
dataset-previous-life-info/bs-cf-is-tests/bs-cf-is-test1/bsTest_1.png
ADDED
Git LFS Details
|
dataset-previous-life-info/bs-cf-is-tests/bs-cf-is-test1/cfTest_1.png
ADDED
Git LFS Details
|
dataset-previous-life-info/bs-cf-is-tests/bs-cf-is-test1/isTest_1.png
ADDED
Git LFS Details
|
dataset-previous-life-info/bs-cf-is-tests/bs-cf-is-test2/bsTest_2.png
ADDED
Git LFS Details
|
dataset-previous-life-info/bs-cf-is-tests/bs-cf-is-test2/cfTest_2.png
ADDED
Git LFS Details
|
dataset-previous-life-info/bs-cf-is-tests/bs-cf-is-test2/isTest_2.png
ADDED
Git LFS Details
|
dataset-previous-life-info/bs-cf-is-tests/bs-cf-is-test3/bsTest_3.png
ADDED
Git LFS Details
|
dataset-previous-life-info/bs-cf-is-tests/bs-cf-is-test3/cfTest_3.png
ADDED
Git LFS Details
|
dataset-previous-life-info/bs-cf-is-tests/bs-cf-is-test3/isTest_3.png
ADDED
Git LFS Details
|
dataset-previous-life-info/bs-cf-is-tests/bs-cf-is-test4/bsTest_4.png
ADDED
Git LFS Details
|
dataset-previous-life-info/bs-cf-is-tests/bs-cf-is-test4/cfTest_4.png
ADDED
Git LFS Details
|
dataset-previous-life-info/bs-cf-is-tests/bs-cf-is-test4/isTest_4.png
ADDED
Git LFS Details
|
dataset-previous-life-info/bs-explain.jpg
ADDED
Git LFS Details
|
dataset-previous-life-info/bs-stats.png
ADDED
Git LFS Details
|
dataset-previous-life-info/cf-explain.jpg
ADDED
Git LFS Details
|
dataset-previous-life-info/cf-stats.png
ADDED
Git LFS Details
|
dataset-previous-life-info/is-explain.jpg
ADDED
Git LFS Details
|
dataset-previous-life-info/is-stats.png
ADDED
Git LFS Details
|
dataset-previous-life-info/mssql-pk-fk.tsv
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
SQL Statement not available!
|
2 |
+
PKTABLE_CAT PKTABLE_SCHEM PKTABLE_NAME PKCOLUMN_NAME FKTABLE_CAT FKTABLE_SCHEM FKTABLE_NAME FKCOLUMN_NAME KEY_SEQ UPDATE_RULE DELETE_RULE FK_NAME PK_NAME DEFERRABILITY
|
3 |
+
"secfsds" "dbo" "fsnds" "fsndsID" "secfsds" "dbo" "cal" "fsndsID" 1 NO ACTION NO ACTION "FK_cal_FKP_fsndsID" "PK_fsndsID" NOT DEFERRABLE
|
4 |
+
"secfsds" "dbo" "fsnds" "fsndsID" "secfsds" "dbo" "dim" "fsndsID" 1 NO ACTION NO ACTION "FK_dim_FKP_fsndsID" "PK_fsndsID" NOT DEFERRABLE
|
5 |
+
"secfsds" "dbo" "ddate" "ddateID" "secfsds" "dbo" "num" "ddateID" 1 NO ACTION NO ACTION "FK_num_FKP_ddateID" "PK_ddateID" NOT DEFERRABLE
|
6 |
+
"secfsds" "dbo" "fsnds" "fsndsID" "secfsds" "dbo" "num" "fsndsID" 1 NO ACTION NO ACTION "FK_num_FKP_fsndsID" "PK_fsndsID" NOT DEFERRABLE
|
7 |
+
"secfsds" "dbo" "fsnds" "fsndsID" "secfsds" "dbo" "pre" "fsndsID" 1 NO ACTION NO ACTION "FK_pre_FKP_fsndsID" "PK_fsndsID" NOT DEFERRABLE
|
8 |
+
"secfsds" "dbo" "fsnds" "fsndsID" "secfsds" "dbo" "ren" "fsndsID" 1 NO ACTION NO ACTION "FK_ren_FKP_fsndsID" "PK_fsndsID" NOT DEFERRABLE
|
9 |
+
"secfsds" "dbo" "fsnds" "fsndsID" "secfsds" "dbo" "sub" "fsndsID" 1 NO ACTION NO ACTION "FK_sub_FKP_fsndsID" "PK_fsndsID" NOT DEFERRABLE
|
10 |
+
"secfsds" "dbo" "sub" "subID" "secfsds" "dbo" "cal" "subID" 1 NO ACTION NO ACTION "FK_cal_FKP_subID" "PK_subID" NOT DEFERRABLE
|
11 |
+
"secfsds" "dbo" "sub" "subID" "secfsds" "dbo" "num" "subID" 1 NO ACTION NO ACTION "FK_num_FKP_subID" "PK_subID" NOT DEFERRABLE
|
12 |
+
"secfsds" "dbo" "sub" "subID" "secfsds" "dbo" "pre" "subID" 1 NO ACTION NO ACTION "FK_pre_FKP_subID" "PK_subID" NOT DEFERRABLE
|
13 |
+
"secfsds" "dbo" "sub" "subID" "secfsds" "dbo" "ren" "subID" 1 NO ACTION NO ACTION "FK_ren_FKP_subID" "PK_subID" NOT DEFERRABLE
|
14 |
+
"secfsds" "dbo" "fsnds" "fsndsID" "secfsds" "dbo" "tag" "fsndsID" 1 NO ACTION NO ACTION "FK_tag_FKP_fsndsID" "PK_fsndsID" NOT DEFERRABLE
|
15 |
+
"secfsds" "dbo" "tag" "tagID" "secfsds" "dbo" "cal" "ctagID" 1 NO ACTION NO ACTION "FK_cal_FKP_ctag" "PK_tagID" NOT DEFERRABLE
|
16 |
+
"secfsds" "dbo" "tag" "tagID" "secfsds" "dbo" "cal" "ptagID" 1 NO ACTION NO ACTION "FK_cal_FKP_ptag" "PK_tagID" NOT DEFERRABLE
|
17 |
+
"secfsds" "dbo" "tag" "tagID" "secfsds" "dbo" "num" "tagID" 1 NO ACTION NO ACTION "FK_num_FKP_tag" "PK_tagID" NOT DEFERRABLE
|
18 |
+
"secfsds" "dbo" "tag" "tagID" "secfsds" "dbo" "pre" "tagID" 1 NO ACTION NO ACTION "FK_pre_FKP_tag" "PK_tagID" NOT DEFERRABLE
|
19 |
+
"secfsds" "dbo" "ddate" "ddateID" "secfsds" "dbo" "txt" "ddateID" 1 NO ACTION NO ACTION "FK_txt_FKP_ddateID" "PK_ddateID" NOT DEFERRABLE
|
20 |
+
"secfsds" "dbo" "fsnds" "fsndsID" "secfsds" "dbo" "txt" "fsndsID" 1 NO ACTION NO ACTION "FK_txt_FKP_fsndsID" "PK_fsndsID" NOT DEFERRABLE
|
21 |
+
"secfsds" "dbo" "sub" "subID" "secfsds" "dbo" "txt" "subID" 1 NO ACTION NO ACTION "FK_txt_FKP_subID" "PK_subID" NOT DEFERRABLE
|
22 |
+
"secfsds" "dbo" "tag" "tagID" "secfsds" "dbo" "txt" "tagID" 1 NO ACTION NO ACTION "FK_txt_FKP_tag" "PK_tagID" NOT DEFERRABLE
|
dataset-previous-life-info/row_count.tsv
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
SELECT
|
2 |
+
" t.NAME AS TableName,"
|
3 |
+
p.rows AS RowCounts
|
4 |
+
FROM
|
5 |
+
sys.tables t
|
6 |
+
INNER JOIN
|
7 |
+
sys.indexes i ON t.OBJECT_ID = i.object_id
|
8 |
+
INNER JOIN
|
9 |
+
sys.partitions p ON i.object_id = p.OBJECT_ID AND i.index_id = p.index_id
|
10 |
+
WHERE
|
11 |
+
t.schema_id = SCHEMA_ID('dbo') AND
|
12 |
+
i.index_id < 2
|
13 |
+
ORDER BY
|
14 |
+
t.NAME
|
15 |
+
TableName RowCounts
|
16 |
+
cal 31284301
|
17 |
+
dates 218786
|
18 |
+
ddate 804
|
19 |
+
dim 21299326
|
20 |
+
fsnds 552
|
21 |
+
num 328405295
|
22 |
+
pre 229500266
|
23 |
+
ren 20760217
|
24 |
+
sub 634310
|
25 |
+
tag 38168186
|
26 |
+
txt 39230531
|