CREATE VIEW ofb_36 AS
SELECT   
  expver                         as expver   ,    
  class                          as class    ,    
  stream                         as stream   ,    
  type                           as type     ,    
  andate                         as andate   ,    
  antime                         as antime   ,    
  reportype                      as reportype,    
  restricted                                 ,

  numtsl                                       ,

  timeslot                                     ,

  seqno                  ,    
  groupid                ,    
  date                   ,    
  time                   ,    
  rdbdate                                           ,
  rdbtime                                           ,
  report_status          ,    
  report_event1          ,    
  degrees(lat)           as lat@hdr                ,    
  degrees(lon)           as lon@hdr                ,    

  sensor                 ,
  satellite_instrument@sat,
  satellite_identifier@sat, 
  instrument_type@resat   ,
  product_type           ,
  lat_fovcorner[1:4]     ,
  lon_fovcorner[1:4]     ,
  solar_elevation        ,
  scanpos                ,
  cloud_cover            ,
  cloud_top_press        ,
  quality_retrieval      ,
  number_layers          ,
  snow_ice_indicator     ,
  surface_type_indicator ,
  methane_correction     ,
  surface_height         ,
  retrsource             ,

  nak                    ,
  wak[1:$mx_ak]          ,
  pak[1:$mx_ak]          ,
  apak[1:$mx_ak]         ,

  entryno                                      ,
  obsvalue                                     ,
  varno                                        ,
  vertco_type                                  ,
  vertco_reference_1                           ,
  vertco_reference_2                           ,

  datum_status                                 ,    
  datum_event1                                 ,    
  biascorr                                     ,
  biascorr_fg                                     ,
  an_depar                                     ,
  fg_depar                                     ,
  datum_status_hires@update_1                        ,

  obs_error                                    ,
  final_obs_error                                    ,
  qc_pge                                       ,
  fg_error                                     ,
  an_sens_obs, 
  report_rdbflag, 
  fc_sens_obs, 
  obstype, 
  subtype, 
  datum_rdbflag, 
  mxup_traj, 
  codetype, 
  hires@update_2, 
  datum_anflag, 
  bufrtype
FROM desc, timeslot_index, hdr, sat, resat, resat_averaging_kernel, body, errstat, update_1, update_2
WHERE reportype is not null
AND groupid=36;
