Skip to content

Commit

Permalink
Updated style path from esm to cjs
Browse files Browse the repository at this point in the history
  • Loading branch information
rNLKJA committed Jan 4, 2024
1 parent 78903fe commit 34ed2a0
Showing 1 changed file with 15 additions and 20 deletions.
35 changes: 15 additions & 20 deletions pages/blogs/intermediate-sql-for-data-scientists.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";
import { Fade } from "react-awesome-reveal";
import { Box, Typography } from "@mui/material";
import SyntaxHighlighter from "react-syntax-highlighter";
import { docco } from "react-syntax-highlighter/dist/esm/styles/hljs";
import { docco as style } from "react-syntax-highlighter/dist/cjs/styles/hljs/darcula";

export default function BlogContent() {
return (
Expand Down Expand Up @@ -38,7 +38,7 @@ export default function BlogContent() {
component="pre"
sx={{ overflow: "auto", bgcolor: "#f5f5f5", p: 2, borderRadius: 1 }}
>
<SyntaxHighlighter language="sql" style={docco}>
<SyntaxHighlighter language="sql" style={style}>
{`SELECT AVG(salary)
FROM employees
WHERE department = 'Sales';`}
Expand All @@ -62,12 +62,11 @@ WHERE department = 'Sales';`}
component="pre"
sx={{ overflow: "auto", bgcolor: "#f5f5f5", p: 2, borderRadius: 1 }}
>
<SyntaxHighlighter language="sql" style={docco}>
<SyntaxHighlighter language="sql" style={style}>
{`SELECT department, COUNT(*)
FROM employees
GROUP BY department
HAVING
COUNT(*) {">"} 10;`}
HAVING COUNT(*) {">"} 10;`}
</SyntaxHighlighter>
</Box>

Expand All @@ -85,11 +84,11 @@ HAVING
component="pre"
sx={{ overflow: "auto", bgcolor: "#f5f5f5", p: 2, borderRadius: 1 }}
>
<SyntaxHighlighter language="sql" style={docco}>
<SyntaxHighlighter language="sql" style={style}>
{`SELECT employees.name, departments.name
FROM employees
INNER JOIN
departments ON employees.department_id = departments.id`}
INNER JOIN departments
ON employees.department_id = departments.id`}
</SyntaxHighlighter>
</Box>

Expand All @@ -111,7 +110,7 @@ INNER JOIN
component="pre"
sx={{ overflow: "auto", bgcolor: "#f5f5f5", p: 2, borderRadius: 1 }}
>
<SyntaxHighlighter language="sql" style={docco}>
<SyntaxHighlighter language="sql" style={style}>
{`SELECT CONCAT(first_name, ' ', last_name) AS full_name
FROM employees;`}
</SyntaxHighlighter>
Expand All @@ -133,13 +132,10 @@ FROM employees;`}
component="pre"
sx={{ overflow: "auto", bgcolor: "#f5f5f5", p: 2, borderRadius: 1 }}
>
<SyntaxHighlighter language="sql" style={docco}>
{`SELECT
department, SUM(salary)
FROM
employees
GROUP BY department
WITH ROLLUP;`}
<SyntaxHighlighter language="sql" style={style}>
{`SELECT department, SUM(salary)
FROM employees
GROUP BY department WITH ROLLUP;`}
</SyntaxHighlighter>
</Box>

Expand All @@ -158,9 +154,8 @@ GROUP BY department
component="pre"
sx={{ overflow: "auto", bgcolor: "#f5f5f5", p: 2, borderRadius: 1 }}
>
<SyntaxHighlighter language="sql" style={docco}>
{`SELECT
name, salary,
<SyntaxHighlighter language="sql" style={style}>
{`SELECT name, salary,
AVG(salary) OVER (PARTITION BY department) AS
avg_department_salary
FROM employees;`}
Expand All @@ -183,7 +178,7 @@ FROM employees;`}
component="pre"
sx={{ overflow: "auto", bgcolor: "#f5f5f5", p: 2, borderRadius: 1 }}
>
<SyntaxHighlighter language="sql" style={docco}>
<SyntaxHighlighter language="sql" style={style}>
{`WITH recursive_cte AS
(
SELECT id, name
Expand Down

0 comments on commit 34ed2a0

Please sign in to comment.