DynamoDB: Query Greater Than (Guide w/ Code Examples)

Provided by Rafal Wilinski
To query a DynamoDB table using the JavaScript SDK and retrieve items where a specific attribute has a value greater than a certain value, you can use the query operation and pass in an object containing the necessary parameters.
const AWS = require('aws-sdk'); const dynamoDb = new AWS.DynamoDB.DocumentClient(); const params = { TableName: 'myTable', KeyConditionExpression: '#id > :value', ExpressionAttributeNames: { '#id': 'id', }, ExpressionAttributeValues: { ':value': 5 } }; dynamoDb.query(params, (error, data) => { if (error) { console.log(error); } else { console.log(data.Items); } });
Similar Code Examples
- DynamoDB Get in Typescript
- DynamoDB: Query Date Range
- DynamoDB: BatchGetItem
- DynamoDB: GetItem
- DynamoDB: Query JSON
- DynamoDB: Increment Counter
- DynamoDB: Not Begins With
- DynamoDB: Query Items
- DynamoDB: Like
- DynamoDB: Delete All Items With Partition Key
- DynamoDB: Attribute Not Null
- DynamoDB: Get Unique Values
- DynamoDB: Get Random Item
- DynamoDB: Batch Get
- DynamoDB: Get All Items
Dynobase is a Professional GUI Client for DynamoDB
Start your 7-day free trial today
Product Features
- New in Dynobase 3.0
- Semantic and Vector Search
- Schema Explorer
- Visual JSON Path Filtering
- Visual Item Diff
- MCP Server for AI Tools
- Use SQL with DynamoDB
- Import CSV To DynamoDB
- Import JSON To DynamoDB
- Export DynamoDB To JSON
- Export DynamoDB To S3
- Export DynamoDB To CSV
- DynamoDB Update Item
- DynamoDB Delete All Items
- DynamoDB Delete Item
- DynamoDB Create Table
- DynamoDB Delete Table
- DynamoDB Conditional Update
DynamoDB Tools
DynamoDB Info
© 2026 Dynobase