My xml looks something like this:

     <Row alphakey="doejohn" building="abc" class="Algebra" />
     <Row alphakey="doejohn" building="abc" class="Geometry" />
     <Row alphakey="personbob" building="abc" class="Calculus" />
     <Row alphakey="personbob" building="abc" class="Precalc" />

And basically I need it to output like this:

Alphakey       Classes
doejohn        Algebra, Geometry
personbob      Calculus, Precalc

I've searched for how to do this with a merge, but I can't quite figure it out, and most examples look different from what I am trying to do. Can someone help me with this?

Are you using XSLT 1.0 or XSLT 2.0 ?

It's a gouping problem.
In XSLT 1.0 we have to use muench method

First step : eliminate double
second step : call all element with same "key" value

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="">
	<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
	<xsl:key match="Row" use="@alphakey" name="row"></xsl:key>
	<xsl:template match="/">
			<xsl:for-each select="/*/Row[generate-id(.)=generate-id(key('row',@alphakey)[1])]"><tr>
				<td><xsl:value-of select="@alphakey"></xsl:value-of></td><td><xsl:apply-templates select="key('row',@alphakey)"></xsl:apply-templates></td>
	<xsl:template match="Row">
	<xsl:value-of select="@class"></xsl:value-of>;