DROP TABLE IF EXISTS my_table;
CREATE TABLE my_table (questionRecID INT NOT NULL PRIMARY KEY,value INT NOT NULL,periodMonth INT NOT NULL, periodYear INT NOT NULL, practiceID INT NOT NULL);
INSERT INTO my_table VALUES
(16 ,70 ,11 ,2010 ,475 ),
(28 ,33 ,11 ,2010 ,475),
(14 ,226 ,11 ,2010 ,475);
SELECT * FROM my_table;
+---------------+-------+-------------+------------+------------+
| questionRecID | value | periodMonth | periodYear | practiceID |
+---------------+-------+-------------+------------+------------+
| 14 | 226 | 11 | 2010 | 475 |
| 16 | 70 | 11 | 2010 | 475 |
| 28 | 33 | 11 | 2010 | 475 |
+---------------+-------+-------------+------------+------------+
SELECT x.*
, x.value/y.value pct
FROM my_table x
JOIN my_table y
ON y.practiceid = x.practiceid
AND y.questionrecid = 14;
+---------------+-------+-------------+------------+------------+--------+
| questionRecID | value | periodMonth | periodYear | practiceID | pct |
+---------------+-------+-------------+------------+------------+--------+
| 14 | 226 | 11 | 2010 | 475 | 1.0000 |
| 16 | 70 | 11 | 2010 | 475 | 0.3097 |
| 28 | 33 | 11 | 2010 | 475 | 0.1460 |
+---------------+-------+-------------+------------+------------+--------+