What Semimajor axis (AU) has a Companion (in order from star) of g?
CREATE TABLE "the_hd_40307_system" (
  "companion_in_order_from_star" text,
  "mass" text,
  "semimajor_axis_au" text,
  "orbital_period_s_day" text,
  "eccentricity" text,
  "inclination" text
);
SELECT "semimajor_axis_au" FROM "the_hd_40307_system" WHERE "companion_in_order_from_star"='g';