Question: I've got two select queries I need to combine into one result.

```
/*  Count of all classes students have passed   */
/* A */
SELECT COUNT(TECH_ID) as Number1, ct.SUBJ, ct.COU_NBR
FROM [ISRS].[ST_COU] st
JOIN [ISRS].[CT_COU_SQL] ct
ON st.COU_ID = ct.COU_ID
WHERE GRADE = 'A' OR Grade = 'B' or Grade = 'C'
GROUP BY ct.SUBJ, ct.COU_NBR

/* Total Count of all students who needed to take a course */
/* B */
SELECT COUNT(TECH_ID) as Number2, ec.SUBJ, ec.COU_NBR
FROM [dbo].[ST_MAJOR_COMMENT] st JOIN [dbo].[Emphasis_Class] ec
ON st.MAJOR = ec.Emphasis
GROUP BY ec.SUBJ, ec.COU_NBR

```

I need SUBJ, COU\_NBR, sum(B - A)

Answer: 
If I understand your requirement correctly, you want the footer to sit at the bottom of the content box.

One solution is to make the content box `position:relative` and move the footer inside it, so that its `position:absolute` will bind it to the content box, and the `bottom:0` will achieve the desired effect of having it sit against the bottom of said content box.

See <http://jsfiddle.net/wn6uvske/5/>.

HTML:

```
<div id="wrapper">
    <div id="sidebar"></div>
    <div id="body-content">
        <div class="header">
            <div class="navbar navbar-default" role="navigation">
                <div class="container">
                    <ul class="nav navbar-nav navbar-right">
                        <li><a href="#" class="menu-toggle">Toggle Menu</a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="main">
            <div class="content container">
                <p>Content</p>
                <div class="footer"> <!-- moved up into content container -->
                    <p>Footer</p>
                </div>
            </div>
        </div>
    </div>
</div>

```

(relevant) CSS:

```
.main .content {
    height: 2000px; 
    background-color: aquamarine;    
    padding-bottom:80px; 
    position:relative;
}
.footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background-color: beige;
}

```
you can use the sticky footer trick. Wrap all of your content in a wrapper excluding the footer, set `min-height:100%` and `margin: -(footer height)` on said wrapper to keep it at the bottom:

[FIDDLE](http://jsfiddle.net/wn6uvske/6/)

**UPDATE**

You can take the `header` section out and use CSS `calc()` to adjust the height:

[NEW FIDDLE](http://jsfiddle.net/wn6uvske/7/)