[INST] Given a table of daily stock prices with columns StockID, Date, and Price, write a SQL query to find the maximum price for each stock in the past 7 days./n [/INST]  ###Response: Sure, here's a possible SQL query that should do what you want:

```
SELECT StockID, MAX(Price) AS MaxPrice
FROM MyTable
WHERE Date >= DATEADD(day, -7, GETDATE())
GROUP BY StockID;
```

This query selects the `StockID` and the maximum `Price` for each stock that has had any price update in the past 7 days (relative to the current date and time). To achieve this, we filter the rows of the table using the `WHERE` clause, which selects only the rows for which the `Date` is within the last 7 days. We then group the results by `StockID` and apply the `MAX` function to the `Price` column to obtain the highest value for each group. Finally, we use the `AS` keyword to rename the output column as `MaxPrice` for clarity.