小编Ale*_*vić的帖子

MySql 与 Postgresql 视图创建

我在 MySql 中有这个视图查询,它可以工作

SELECT s.id AS id,
       s.customer_id AS customer_id,
       s.shipment_status_id AS shipment_status_id,
       ss.name AS shipment_status_name,
       s.ship_from_date AS ship_from_date,
       s.ship_to_company AS ship_to_company,
       s.ship_from_company AS ship_from_company,
       s.ship_to_address1 AS ship_to_address1,
       s.ship_to_address2 AS ship_to_address2,
       s.ship_to_postal_code AS ship_to_postal_code,
       s.ship_to_city AS ship_to_city,
       c.country AS country,
       p.tracking_numbers AS tracking_numbers,
       s.quote_service_name AS quote_service_name,
       s.quote_total_charge AS quote_total_charge,
       p.weight AS weight,
       p.insurance_amount AS insurance_amount,
       p.cod_amount AS cod_amount,
       z.fedex AS ZONE,
       s_p.code AS state_province_code,
       s_p.zone AS state_province_zone,
       ss.name AS status_name,
       i.total AS total,
       cust.first_name AS customer_first_name,
       cust.last_name AS customer_last_name,
       (CASE …
Run Code Online (Sandbox Code Playgroud)

postgresql group-by

2
推荐指数
1
解决办法
358
查看次数

标签 统计

group-by ×1

postgresql ×1