KSQL is the streaming SQL engine for Apache Kafka®. With KSQL, you can write
real-time streaming applications by using a SQL-like query language.

Kafka Streams is the Apache Kafka® library for writing streaming applications
and microservices in Java and Scala.

KSQL is built on Kafka Streams, a robust stream processing framework that is
part of Kafka.

KSQL gives you the highest level of abstraction for implementing real-time
streaming business logic on Kafka topics. KSQL automates much of the complex
programming that's required for real-time operations on streams of data, so
that one line of KSQL can do the work of a dozen lines of Java and Kafka
Streams.

For example, to implement simple fraud-detection logic on a Kafka topic named
payments, you could write one line of KSQL:

KSQL is easier to use, and Kafka Streams is more flexible. Which technology
you choose for your real-time streaming applications depends on a number of
considerations. Keep in mind that you can use both KSQL and Kafka Streams
together in your implementations.

There are different workflows for KSQL and Kafka Streams when you develop
streaming applications.

KSQL

You write KSQL queries interactively and view the results in real-time,
either in the KSQL CLI or in Confluent Control Center. You can save a .sql file and deploy it to
production as a "headless" application, which runs without a GUI, CLI, or REST
interface on KSQL servers.

Kafka Streams

You write code in Java or Scala, recompile, and run and test
the application in an IDE, like IntelliJ. You deploy the application to
production as a jar file that runs in a Kafka cluster.