Amazon DynamoDB
开发人员指南 (API Version 2012-08-10)
AWS 服务或AWS文档中描述的功能,可能因地区/位置而异。点 击 Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

步骤 6:查询 DynamoDB 表中的数据

在此步骤中,您将使用 HiveQL 查询 DynamoDB 中的“Features”表。尝试以下 Hive 查询:

  1. 所有特征类型 (feature_class) 按字母顺序排列:

    SELECT DISTINCT feature_class FROM ddb_features ORDER BY feature_class;
  2. 以字母“M”开头的所有湖:

    SELECT feature_name, state_alpha FROM ddb_features WHERE feature_class = 'Lake' AND feature_name LIKE 'M%' ORDER BY feature_name;
  3. 至少有三个特征高于 1 英里 (5280 英尺) 的州:

    SELECT state_alpha, feature_class, COUNT(*) FROM ddb_features WHERE elev_in_ft > 5280 GROUP by state_alpha, feature_class HAVING COUNT(*) >= 3 ORDER BY state_alpha, feature_class;


步骤 7:(可选) 清除