Working in SQL Server, I have a table with 4 columns

* AccountId
* AccountName
* SubscriptionAmt
* DateKey

It lists each company's `SubscriptionAmt` by month (`DateKey`, i.e 201801) as they change over time.

I want to write one select statement including 

```
AccountId, AccountName, EarliestSubscriptionAmt, LatestSubscriptionAmt, Difference

```

I know the effort below is not correct. I know I have to do some kind of partition over in the sub queries but I cant put my finger on it

Any help is appreciated

```
SELECT 
    [Account ID],
    [Account Name],
    b.EarlySub,
    c.LatestSub,
    (c.LatestSub - b.EarlySub / b.EarlySub) * 100 as PercentageChange
FROM 
    SubTable AS
LEFT JOIN
    (SELECT
         [Account ID],
         SubscriptionAmt AS EarlySub
     FROM 
         SubTable
     WHERE 
         DateKey = MIN(DateKey)) AS b ON a.[Account ID] = b.[Account ID]
LEFT JOIN
    (SELECT
         [Account ID],
         SubscriptionAmt AS LatestSub
     FROM 
         SubTable
     WHERE 
         DateKey = MAX(DateKey)) AS c ON a.[Account ID] = c.[Account ID]

```

Sample Data:

```
AccountId   AccountName   SubscriptionAmt   DateKey  
----------------------------------------------------
    1       Bob's Store        100          201701
    1       Bob's Store        200          201702
    1       Bob's Store        300          201703
    1       Bob's Store        400          201704

```

Desired Results:

```
AccountId  AccountName   EarliestSubAmt  LatestSubAmt  PercentageChange
------------------------------------------------------------------------
    1      Bob's Store       100             400           300%

```