CREATE VIEW ofb_9 AS 

SELECT 

// Insert constant columns here 
expver@desc as expver, 
class@desc as class, 
stream@desc as stream, 
type@desc as type, 
andate@desc as andate, 
antime@desc as antime, 
reportype@hdr as reportype, 
numtsl@desc, 
mxup_traj@desc, 

// Insert hdr-aligned columns here 
date@hdr, 
rdbdate@hdr, 
restricted@hdr, 
timeslot@timeslot_index, 
seqno@hdr, 
bufrtype@hdr, 
subtype@hdr, 
groupid@hdr, 
obstype@hdr, 
codetype@hdr, 
sensor@hdr, 
time@hdr, 
rdbtime@hdr, 
report_status@hdr, 
report_event1@hdr, 
degrees(lat@hdr) as lat@hdr, 
degrees(lon@hdr) as lon@hdr, 
satellite_identifier@sat, 
zenith@sat, 
datastream@sat, 
comp_method@satob, 
qi_fc@satob, 
qi_nofc@satob, 
rff@satob, 
ee@satob, 
tb@satob, 
shear@satob, 
p_best@satob, 
umod_old@satob,
vmod_old@satob,
u_best@satob, 
v_best@satob, 
height_assignment_method@satob, 
tracer_correlation_method@satob, 
land_sea@satob, 
tracking_error_u@satob, 
tracking_error_v@satob, 
h_assignment_error_u@satob, 
h_assignment_error_v@satob, 
error_in_h_assignment@satob, 
report_rdbflag@hdr, 
gen_subcentre@sat, 
gen_centre@sat, 

// Insert body-aligned columns here 
entryno@body, 
vertco_reference_1@body, 
vertco_reference_2@body,
obsvalue@body, 
varno@body, 
vertco_type@body, 
datum_status@body, 
datum_event1@body, 
datum_anflag@body, 
an_depar@body, 
fg_depar@body, 
datum_status_hires@update_1, 
qc_pge@body, 
obs_error@errstat, 
final_obs_error@errstat, 
fg_error@errstat, 
biascorr@body, 
biascorr_fg@body, 
eda_spread@errstat, 
an_sens_obs@body, 
datum_rdbflag@body, 
fc_sens_obs@body, 
hires@update_2

WHERE groupid@hdr == 9 ;
