Analysis Specification for SCCS

先日の解析で使用したSQL スクリプトです

コマンド フィールド名 追加元・更新元
クエリ名 0010 SCCS_preprocess q
説 明
select_into [0010 SCCS_preprocess]
select Oxford.indiv
select 547 AS age
select Oxford.start
select Oxford.end
select Oxford.exday
select [exday]+14 AS ex1
select [exday]+35 AS ex2
select [ex1]-[start] AS l1a1
select [age]-[start] AS l1a2
select IIf([l1a1]>[l1a2],[l1a2],[l1a1]) AS l1a
select [ex2]-[ex1] AS l1b1
select [age]-[ex1] AS l1b2
select IIf([l1b1]>[l1b2],[l1b2],[l1b1]) AS l1b
select [age]-[ex2] AS l1c
select [ex1]-[age] AS l2a
select [ex2]-[ex1] AS l2b1
select [ex2]-[age] AS l2b2
select IIf([l2b1]>[l2b2],[l2b2],[l2b1]) AS l2b
select [end]-[ex2] AS l2c1
select [end]-[age] AS l2c2
select IIf([l2c1]>[l2c2],[l2c2],[l2c1]) AS l2c
select Oxford.eventday INTO [0010 SCCS_preprocess]
from Oxford
クエリ名 0020 Event q
説 明
select_into [0020 Event]
select [0010 SCCS_preprocess].indiv
select (([eventday]<[ex1]) And ([eventday]<[age])) AS El1a
select ([ex1]<[eventday]+1) And ([eventday]<[ex2]+1) And ([eventday]<[age]) AS El1b
select ([ex2]<[eventday]) And ([eventday]<[age]) AS El1c
select ([age]<[eventday]+1) And ([eventday]<[ex1]) AS El2a
select ([age]<[eventday]+1) And ([ex1]<[eventday]+1) And ([eventday]<[ex2]+1) AS El2b
select ([age]<[eventday]+1) And ([ex2]<[eventday]) AS El2c INTO [0020 Event]
from [0010 SCCS_preprocess]
クエリ名 0030 L1A q
説 明
select_into [0030 L1A]
select Oxford.indiv
select Abs([El1a]) AS event
select [0010 SCCS_preprocess].l1a AS [interval]
select 1 AS agegr
select 0 AS exgr INTO [0030 L1A]
from (Oxford INNER JOIN
from [0010 SCCS_preprocess] ON
from Oxford.indiv = [0010 SCCS_preprocess].indiv) INNER JOIN
from [0020 Event] ON
from Oxford.indiv = [0020 Event].indiv
クエリ名 0040 L1B q
説 明
select_into [0040 L1B]
select Oxford.indiv
select Abs([El1b]) AS event
select [0010 SCCS_preprocess].l1b AS [interval]
select 1 AS agegr
select 1 AS exgr
select [ex2]>[Oxford]![start] AS term1
select [Oxford]![end]>[ex1] AS rerm2 INTO [0040 L1B]
from (Oxford INNER JOIN
from [0010 SCCS_preprocess] ON
from Oxford.indiv = [0010 SCCS_preprocess].indiv) INNER JOIN
from [0020 Event] ON
from Oxford.indiv = [0020 Event].indiv
where ((([0010 SCCS_preprocess].l1b)>0) And
where (([ex2]>[Oxford]![start])=True) And
where (([Oxford]![end]>[ex1])=True))
クエリ名 0050 L1C q
説 明
select_into [0050 L1C]
select Oxford.indiv
select Abs([El1c]) AS event
select [0010 SCCS_preprocess].l1c AS [interval]
select 1 AS agegr
select 0 AS exgr INTO [0050 L1C]
from (Oxford INNER JOIN
from [0010 SCCS_preprocess] ON
from Oxford.indiv = [0010 SCCS_preprocess].indiv) INNER JOIN
from [0020 Event] ON
from Oxford.indiv = [0020 Event].indiv
where ((([0010 SCCS_preprocess].l1c)>0))
クエリ名 0060 L2A q
説 明
select_into [0060 L2A]
select Oxford.indiv
select Abs([El2a]) AS event
select [0010 SCCS_preprocess].l2a AS [interval]
select 2 AS agegr
select 0 AS exgr INTO [0060 L2A]
from (Oxford INNER JOIN
from [0010 SCCS_preprocess] ON
from Oxford.indiv = [0010 SCCS_preprocess].indiv) INNER JOIN
from [0020 Event] ON
from Oxford.indiv = [0020 Event].indiv
where ((([0010 SCCS_preprocess].l2a)>0))
クエリ名 0070 L2B q
説 明
select_into [0070 L2B]
select Oxford.indiv
select Abs([El2b]) AS event
select [0010 SCCS_preprocess].l2b AS [interval]
select 2 AS agegr
select 1 AS exgr
select [ex2]>[Oxford]![start] AS term1
select [Oxford]![end]>[ex1] AS rerm2 INTO [0070 L2B]
from (Oxford INNER JOIN
from [0010 SCCS_preprocess] ON
from Oxford.indiv = [0010 SCCS_preprocess].indiv) INNER JOIN
from [0020 Event] ON
from Oxford.indiv = [0020 Event].indiv
where ((([0010 SCCS_preprocess].l2b)>0) And
where (([ex2]>Oxford!start)=True) And
where ((Oxford!end>[ex1])=True))
クエリ名 0080 L2C q
説 明
select_into [0080 L2C]
select Oxford.indiv
select Abs([El2c]) AS event
select [0010 SCCS_preprocess].l2c AS [interval]
select 2 AS agegr
select 0 AS exgr INTO [0080 L2C]
from (Oxford INNER JOIN
from [0010 SCCS_preprocess] ON
from Oxford.indiv = [0010 SCCS_preprocess].indiv) INNER JOIN
from [0020 Event] ON
from Oxford.indiv = [0020 Event].indiv
where ((([0010 SCCS_preprocess].l2c)>0))
クエリ名 0090 chopdat1A q
説 明
select_into [0090 chopdat]
select Oxford.indiv
select [0030 L1A].event
select [0030 L1A].interval
select [0030 L1A].agegr
select [0030 L1A].exgr
select Log([interval]) AS loginterval INTO [0090 chopdat]
from Oxford INNER JOIN
from [0030 L1A] ON
from Oxford.indiv = [0030 L1A].indiv
クエリ名 0100 chopdat1B q
説 明
insert [0090 chopdat] Oxford.indiv = [0040 L1B].indiv
field indiv ← Oxford.[indiv]
field event ← [0040 L1B].event
field [interval] ← [0040 L1B].interval
field agegr ← [0040 L1B].agegr
field exgr ← [0040 L1B].exgr
field loginterval ← Log([interval]) AS loginterfal
from Oxford INNER JOIN
from [0040 L1B] ON
from Oxford.indiv = [0040 L1B].indiv
クエリ名 0110 chopdat1C q
説 明
insert [0090 chopdat] Oxford.indiv = [0050 L1C].indiv
field indiv ← Oxford.[indiv]
field event ← [0050 L1C].event
field [interval] ← [0050 L1C].interval
field agegr ← [0050 L1C].agegr
field exgr ← [0050 L1C].exgr
field loginterval ← Log([interval]) AS loginterfal
from Oxford INNER JOIN
from [0050 L1C] ON
from Oxford.indiv = [0050 L1C].indiv
クエリ名 0120 chopdat2A q
説 明
insert [0090 chopdat] Oxford.indiv = [0060 L2A].indiv
field indiv ← Oxford.[indiv]
field event ← [0060 L2A].event
field [interval] ← [0060 L2A].interval
field agegr ← [0060 L2A].agegr
field exgr ← [0060 L2A].exgr
field loginterval ← Log([interval]) AS loginterfal
from Oxford INNER JOIN
from [0060 L2A] ON
from Oxford.indiv = [0060 L2A].indiv
クエリ名 0130 chopdat2B q
説 明
insert [0090 chopdat] Oxford.indiv = [0070 L2B].indiv
field indiv ← Oxford.[indiv]
field event ← [0070 L2B].event
field [interval] ← [0070 L2B].interval
field agegr ← [0070 L2B].agegr
field exgr ← [0070 L2B].exgr
field loginterval ← Log([interval]) AS loginterfal
from Oxford INNER JOIN
from [0070 L2B] ON
from Oxford.indiv = [0070 L2B].indiv
クエリ名 0140 chopdat L2C q
説 明
insert [0090 chopdat] Oxford.indiv = [0080 L2C].indiv
field indiv ← Oxford.[indiv]
field event ← [0080 L2C].event
field [interval] ← [0080 L2C].interval
field agegr ← [0080 L2C].agegr
field exgr ← [0080 L2C].exgr
field loginterval ← Log([interval]) AS loginterfal
from Oxford INNER JOIN
from [0080 L2C] ON
from Oxford.indiv = [0080 L2C].indiv
クエリ名 0150 chopdat q
説 明
select_into [0150 chopdat]
select [0090 chopdat].indiv
select [0090 chopdat].event
select [0090 chopdat].interval
select [0090 chopdat].agegr
select [0090 chopdat].exgr
select Round([0090 chopdat]![loginterval],6) AS loginterval INTO [0150 chopdat]
from [0090 chopdat]
order by [0090 chopdat].indiv

1件のコメント

コメントする

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください

Translate »