I am trying to create a view for the following query.
SELECT DISTINCT
products.pid AS id,
products.pname AS name,
products.p_desc AS descri
You have different types being unioned into the same column. (The names can be different, but the types have to be the same, or at least auto-castable.) But as @Learning points out, it looks like you've twisted the SELECT column enumerations.
Just in case, the proper syntax (which worked for me) is
CREATE VIEW myView
AS
SELECT ...