<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://in.compucrete.com/index.php?action=history&amp;feed=atom&amp;title=Payroll_Exemption_Queries</id>
	<title>Payroll Exemption Queries - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://in.compucrete.com/index.php?action=history&amp;feed=atom&amp;title=Payroll_Exemption_Queries"/>
	<link rel="alternate" type="text/html" href="http://in.compucrete.com/index.php?title=Payroll_Exemption_Queries&amp;action=history"/>
	<updated>2026-05-15T19:30:38Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>http://in.compucrete.com/index.php?title=Payroll_Exemption_Queries&amp;diff=490&amp;oldid=prev</id>
		<title>WikiAdmin: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="http://in.compucrete.com/index.php?title=Payroll_Exemption_Queries&amp;diff=490&amp;oldid=prev"/>
		<updated>2023-07-14T13:00:34Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:00, 14 July 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>WikiAdmin</name></author>
	</entry>
	<entry>
		<id>http://in.compucrete.com/index.php?title=Payroll_Exemption_Queries&amp;diff=489&amp;oldid=prev</id>
		<title>Intra&gt;User: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="http://in.compucrete.com/index.php?title=Payroll_Exemption_Queries&amp;diff=489&amp;oldid=prev"/>
		<updated>2017-01-10T00:02:08Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Exemptions vs. Federal Gross==&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
Select emp_id,em.display_name,run_no,session_no,trans_no,trx_date,def_value GROSS,&lt;br /&gt;
 (select sum(def_value) from prtempdefhst e1 where e1.session_no=eh.session_no and e1.trans_no=eh.trans_no&lt;br /&gt;
   and e1.def_id='FEDGRS')  FEDGRS,&lt;br /&gt;
 (select sum(def_value) from prtempdefhst e1 where e1.session_no=eh.session_no and e1.trans_no=eh.trans_no&lt;br /&gt;
   and e1.def_id in&lt;br /&gt;
    (select (select def_id from prtcompdef where LINK_ID=(select link_id from prtcompdef cd where cd.def_id=cdx.def_id1) &lt;br /&gt;
     and def_type='D') from prtcompdefxref cdx where def_id2='FEDGRS') )  FEDdedExm,&lt;br /&gt;
def_value- (select sum(def_value) from prtempdefhst e1 where e1.session_no=eh.session_no and e1.trans_no=eh.trans_no&lt;br /&gt;
   and e1.def_id='FEDGRS') FEDEEXM_Actual&lt;br /&gt;
 from prtempdefhst eh&lt;br /&gt;
inner join prtemployee em on (em.emp_id = eh.emp_id)&lt;br /&gt;
where def_id='GROSS' and trx_date&amp;gt;='1/1/6'&lt;br /&gt;
and&lt;br /&gt;
 (select sum(def_value) from prtempdefhst e1 where e1.session_no=eh.session_no and e1.trans_no=eh.trans_no&lt;br /&gt;
   and e1.def_id in&lt;br /&gt;
    (select (select def_id from prtcompdef where LINK_ID=(select link_id from prtcompdef cd where cd.def_id=cdx.def_id1) &lt;br /&gt;
     and def_type='D') from prtcompdefxref cdx where def_id2='FEDGRS') )  is not null&lt;br /&gt;
and&lt;br /&gt;
 (select sum(def_value) from prtempdefhst e1 where e1.session_no=eh.session_no and e1.trans_no=eh.trans_no&lt;br /&gt;
   and e1.def_id in&lt;br /&gt;
    (select (select def_id from prtcompdef where LINK_ID=(select link_id from prtcompdef cd where cd.def_id=cdx.def_id1) &lt;br /&gt;
     and def_type='D') from prtcompdefxref cdx where def_id2='FEDGRS') ) &amp;lt;&amp;gt;&lt;br /&gt;
 def_value- (select sum(def_value) from prtempdefhst e1 where e1.session_no=eh.session_no and e1.trans_no=eh.trans_no&lt;br /&gt;
   and e1.def_id='FEDGRS')&lt;br /&gt;
order by emp_id,em.display_name&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Exemptions vs SS Gross== &lt;br /&gt;
&amp;lt;PRE&amp;gt;Select emp_id,em.display_name,run_no,session_no,trans_no,trx_date,def_value GROSS,&lt;br /&gt;
 (select sum(def_value) from prtempdefhst e1 where e1.session_no=eh.session_no and e1.trans_no=eh.trans_no&lt;br /&gt;
   and e1.def_id='SSGROSS')  SSGROSS,&lt;br /&gt;
 (select sum(def_value) from prtempdefhst e1 where e1.session_no=eh.session_no and e1.trans_no=eh.trans_no&lt;br /&gt;
   and e1.def_id in&lt;br /&gt;
    (select (select def_id from prtcompdef where LINK_ID=(select link_id from prtcompdef cd where cd.def_id=cdx.def_id1) &lt;br /&gt;
     and def_type='D') from prtcompdefxref cdx where def_id2='SSGROSS') )  SSdedExm,&lt;br /&gt;
def_value- (select sum(def_value) from prtempdefhst e1 where e1.session_no=eh.session_no and e1.trans_no=eh.trans_no&lt;br /&gt;
   and e1.def_id='SSGROSS') SSEEXM_Actual&lt;br /&gt;
 from prtempdefhst eh&lt;br /&gt;
inner join prtemployee em on (em.emp_id = eh.emp_id)&lt;br /&gt;
where def_id='GROSS' and trx_date&amp;gt;='1/1/6'&lt;br /&gt;
and&lt;br /&gt;
 (select sum(def_value) from prtempdefhst e1 where e1.session_no=eh.session_no and e1.trans_no=eh.trans_no&lt;br /&gt;
   and e1.def_id in&lt;br /&gt;
    (select (select def_id from prtcompdef where LINK_ID=(select link_id from prtcompdef cd where cd.def_id=cdx.def_id1) &lt;br /&gt;
     and def_type='D') from prtcompdefxref cdx where def_id2='SSGROSS') )  is not null&lt;br /&gt;
and&lt;br /&gt;
 (select sum(def_value) from prtempdefhst e1 where e1.session_no=eh.session_no and e1.trans_no=eh.trans_no&lt;br /&gt;
   and e1.def_id in&lt;br /&gt;
    (select (select def_id from prtcompdef where LINK_ID=(select link_id from prtcompdef cd where cd.def_id=cdx.def_id1) &lt;br /&gt;
     and def_type='D') from prtcompdefxref cdx where def_id2='SSGROSS') ) &amp;lt;&amp;gt;&lt;br /&gt;
 def_value- (select sum(def_value) from prtempdefhst e1 where e1.session_no=eh.session_no and e1.trans_no=eh.trans_no&lt;br /&gt;
   and e1.def_id='SSGROSS')&lt;br /&gt;
order by emp_id,em.display_name&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See [[Exemption Deductions List]]&lt;/div&gt;</summary>
		<author><name>Intra&gt;User</name></author>
	</entry>
</feed>