1. Preparation
First, I need to create a table and write the corresponding fields in it:
create table t_order_mt(
id UInt32,
sku_id String,
total_amount Decimal(16,2),
create_time Datetime
) engine =MergeTree
partition by toYYYYMMDD(create_time)
primary key (id)
order by (id,sku_id);
Next, you need to insert the corresponding data into it:
insert into t_order_mt values
(101,'sku_001',1000.00,'2020-06-01 12:00:00') ,
(102,'sku_002',2000.00,'2020-06-01 11:00:00'),
(102,'sku_004',2500.00,'2020-06-01 12:00:00'),
(102,'sku_002',2000.00,'2020-06-01 13:00:00'),
(102,'sku_002',12000.00,'2020-06-01 13:00:00'),
(102,'sku_002',600.00,'2020-06-02 12:00:00');
2. Error display
When I execute select * from table_name, the following problems may occur:
Code: 62. DB::Exception: Syntax error (Multi-statements are not allowed): failed at position 54 (end of query) (line 1, col 54): ;
FORMAT JSON . . (SYNTAX_ERROR) (version 21.11.6.7 (official build))
3. Solution
You only need to end the sentence after the corresponding sentence; Change to:
select * from t_order_mt;;
Results
Read More:
- JAVA Code Start Exception Error View Does Not Exsit [Solved]
- [Solved] Could not find resource COM / atguigu / Dao / studentdao.xm, the mapper file for storing SQL statements could not be found and an error occurred
- [Solved] Mapped Statements collection does not contain value for xxx
- Maven plugin development report error- plugin:3.2 :descriptor fai
- [Solved] Mybatis Batch Modify Error: multi-statement not allow
- Public Key Retrieval is not allowed [How to Solve]
- org.hibernate.exception.SQLGrammarException: could not extract ResultSet, Resolve MySQL 5.7.5 or above GROUP_BY is not supported
- [Fixed] Disgusting bug Error:Failed to Load project configuration: cannot parse filemessage: content is not allowed in the preface.
- [Solved] org.hibernate.exception.SQLGrammarException: could not extract ResultSet at org.hibernate.exception
- C++: Implementation of multi-channel IO transfer with select
- [Solved] IO exception: NL exception was generated
- [Solved] IDEA2021.3 Error: Failed to write core dump. Minidumps are not enabled by default on client versions of
- [Solved] ElasticsearchStatusException[Elasticsearch exception [type=mapper_parsing_exception, reason=failed t
- [Solved] Maven Multi-Project Compile Error: The POM for xxx is invalid
- Idea unified setting code to UTF-8 code and solution of Tomcat garbled code
- [Solved] Docker-compose Start error: pyrsistent syntax error: invalid syntax
- [Solved] Kafka Error: is/are not present and missingTopicsFatal is true
- keytool error: java.lang.Exception: Input not an X.509 certificate
- [Solved] Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred.
- mybatis Error: All elements are null [How to Solve]