<DBXML type="inqreport">
	<TABLE name="Simttime_currentsum" status="" central="true" out="inquiry" rname="Ttime_current">
		<FIELD>employeeid</FIELD>
		<FIELD>companyid</FIELD>
		<FIELD>dateid</FIELD>
		<FIELD>time0id</FIELD>		
		<FIELD>eventgrp</FIELD>	
		<FIELD>branch</FIELD>
		<FIELD>bu1</FIELD> 
		<FIELD>bu2</FIELD> 
		<FIELD>bu3</FIELD> 
		<FIELD>bu4</FIELD> 
		<FIELD>bu5</FIELD> 
		<FIELD>lt</FIELD>
		<FIELD>lv</FIELD>		 
		<FIELD>ot</FIELD> 
		<FIELD>hour_d</FIELD> 
		<FIELD>emp_position</FIELD>
		<FIELD>emp_group</FIELD>	
		<FIELD>workarea</FIELD>			
		<FIELD>jobcode</FIELD>
		<!--FIELD>countempbu1</FIELD>
		<FIELD>countempbu2</FIELD>	
		<FIELD>countempbu3</FIELD>
		<FIELD>countempbu4</FIELD>	
		<FIELD>countempbu5</FIELD>
		<FIELD>countempbranch</FIELD>
		<FIELD>countemp</FIELD-->
		<ORDER>				
			<FIELD>branch</FIELD>			
			<FIELD>emp_group</FIELD>			
			<FIELD>bu1</FIELD>
			<FIELD>bu2</FIELD> 
			<FIELD>bu3</FIELD> 
			<FIELD>bu4</FIELD> 
			<FIELD>bu5</FIELD> 
			<FIELD>emp_position</FIELD>
			<FIELD>companyid</FIELD>
		</ORDER>
	</TABLE>

	<TABLE name="mbranch" status="" central="false" out="inquiry">
		<FIELD>branchid</FIELD>	
		<FIELD>companyid</FIELD>	
		<FIELD>edesc</FIELD>
		<FIELD>tdesc</FIELD>				
		<ORDER>			
			<FIELD>branchid</FIELD>
			<FIELD>companyid</FIELD>
		</ORDER>
	</TABLE>

	
	<TABLE name="mbu1" status="" central="false" out="inquiry">
		<FIELD>bu1id</FIELD>	
		<FIELD>companyid</FIELD>	
		<FIELD>edesc</FIELD>
		<FIELD>tdesc</FIELD>				
		<ORDER>			
			<FIELD>bu1id</FIELD>
			<FIELD>companyid</FIELD>
		</ORDER>
	</TABLE>

	<TABLE name="mbu2" status="" central="false" out="inquiry">
		<FIELD>bu2id</FIELD>	
		<FIELD>companyid</FIELD>	
		<FIELD>edesc</FIELD>
		<FIELD>tdesc</FIELD>				
		<ORDER>			
			<FIELD>bu2id</FIELD>
			<FIELD>companyid</FIELD>
		</ORDER>
	</TABLE>

	<TABLE name="mbu3" status="" central="false" out="inquiry">
		<FIELD>bu3id</FIELD>		
		<FIELD>companyid</FIELD>	
		<FIELD>edesc</FIELD>
		<FIELD>tdesc</FIELD>				
		<ORDER>			
			<FIELD>bu3id</FIELD>
			<FIELD>companyid</FIELD>
		</ORDER>
	</TABLE>

	<TABLE name="mbu4" status="" central="false" out="inquiry">
		<FIELD>bu4id</FIELD>	
		<FIELD>companyid</FIELD>	
		<FIELD>edesc</FIELD>
		<FIELD>tdesc</FIELD>				
		<ORDER>			
			<FIELD>bu4id</FIELD>
			<FIELD>companyid</FIELD>
		</ORDER>
	</TABLE>

	<TABLE name="mbu5" status="" central="false" out="inquiry">
		<FIELD>bu5id</FIELD>		
		<FIELD>companyid</FIELD>	
		<FIELD>edesc</FIELD>
		<FIELD>tdesc</FIELD>				
		<ORDER>			
			<FIELD>bu5id</FIELD>
			<FIELD>companyid</FIELD>
		</ORDER>
	</TABLE>
	<TABLE name="mworkarea" status="" central="false" out="inquiry">
		<FIELD>workareaid</FIELD>		
		<FIELD>companyid</FIELD>	
		<FIELD>edesc</FIELD>
		<FIELD>tdesc</FIELD>				
		<ORDER>			
			<FIELD>workareaid</FIELD>
			<FIELD>companyid</FIELD>
		</ORDER>
	</TABLE>

	<TABLE name="mjobcode" status="" central="false" out="inquiry">
		<FIELD>jobcodeid</FIELD>		
		<FIELD>companyid</FIELD>	
		<FIELD>edesc</FIELD>
		<FIELD>tdesc</FIELD>				
		<ORDER>			
			<FIELD>jobcodeid</FIELD>
			<FIELD>companyid</FIELD>
		</ORDER>
	</TABLE>

	<TABLE name="mposition" status="" central="false" out="inquiry">
		<FIELD>positionid</FIELD>		
		<FIELD>companyid</FIELD>	
		<FIELD>edesc</FIELD>
		<FIELD>tdesc</FIELD>				
		<ORDER>			
			<FIELD>positionid</FIELD>
			<FIELD>companyid</FIELD>
		</ORDER>
	</TABLE>
	<TABLE name="mgroup" status="" central="false" out="inquiry">
		<FIELD>groupid</FIELD>		
		<FIELD>companyid</FIELD>
		<FIELD>tdesc</FIELD>
		<FIELD>edesc</FIELD>			
		<FIELD>consolidate</FIELD>			
		<ORDER>			
			<FIELD>groupid</FIELD>
			<FIELD>companyid</FIELD>
		</ORDER>
	</TABLE>
	<SIM>
		<FIELD tablename="ttime_current" simname="countEmpBu1" groupby="ttime_current.bu1" having ="" tablerelate="mbu1">count(distinct ttime_current.employeeid)</FIELD>
		<FIELD tablename="ttime_current" simname="countEmpBu2" groupby="ttime_current.bu2" having ="" tablerelate="mbu2">count(distinct ttime_current.employeeid)</FIELD>
		<FIELD tablename="ttime_current" simname="countEmpBu3" groupby="ttime_current.bu3" having ="" tablerelate="mbu3">count(distinct ttime_current.employeeid)</FIELD>
		<FIELD tablename="ttime_current" simname="countEmpBu4" groupby="ttime_current.bu4" having ="" tablerelate="mbu4">count(distinct ttime_current.employeeid)</FIELD>
		<FIELD tablename="ttime_current" simname="countEmpBu5" groupby="ttime_current.bu5" having ="" tablerelate="mbu5">count(distinct ttime_current.employeeid)</FIELD>
		<FIELD tablename="ttime_current" simname="countEmpBranch" groupby="ttime_current.branch" having ="" tablerelate="mbranch">count(distinct ttime_current.employeeid)</FIELD>
		<FIELD tablename="ttime_current" simname="countEmpEmpGroup" groupby="ttime_current.emp_group" having ="" tablerelate="mgroup">count(distinct ttime_current.employeeid)</FIELD>
		<FIELD tablename="ttime_current" simname="countEmp" groupby="" having ="" tablerelate="">count(distinct ttime_current.employeeid)</FIELD>  
	</SIM>	
	<GROUPBY/>
</DBXML>
