Skip to content

added solution to lc:1495 #764

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -93,26 +93,31 @@ TVProgram</code> 表:

<!-- tabs:start -->

### **Python3**

<!-- 这里可写当前语言的特殊实现逻辑 -->

```python

```

### **Java**

<!-- 这里可写当前语言的特殊实现逻辑 -->

```java

```

### **...**

### **SQL**

```sql
SELECT DISTINCT
title
FROM
Content
INNER JOIN
TVProgram ON Content.content_id = TVProgram.content_id
WHERE
content_type = 'Movies'
AND kids_content = 'Y'
AND program_date BETWEEN '2020-06-01' AND '2020-06-30';
```

```
```sql
SELECT DISTINCT
title
FROM
Content
INNER JOIN
TVProgram ON Content.content_id = TVProgram.content_id
WHERE
kids_content = 'Y'
AND (MONTH(program_date) , YEAR(program_date)) = (6 , 2020);
```

<!-- tabs:end -->
Original file line number Diff line number Diff line change
Expand Up @@ -89,22 +89,30 @@ Content table:

<!-- tabs:start -->

### **Python3**

```python

```

### **Java**

```java

```sql
SELECT DISTINCT
title
FROM
Content
INNER JOIN
TVProgram ON Content.content_id = TVProgram.content_id
WHERE
content_type = 'Movies'
AND kids_content = 'Y'
AND program_date BETWEEN '2020-06-01' AND '2020-06-30';
```

### **...**

```

```
```sql
SELECT DISTINCT
title
FROM
Content
INNER JOIN
TVProgram ON Content.content_id = TVProgram.content_id
WHERE
kids_content = 'Y'
AND (MONTH(program_date) , YEAR(program_date)) = (6 , 2020);
```

<!-- tabs:end -->
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
SELECT DISTINCT
title
FROM
Content
INNER JOIN
TVProgram ON Content.content_id = TVProgram.content_id
WHERE
content_type = 'Movies'
AND kids_content = 'Y'
AND program_date BETWEEN '2020-06-01' AND '2020-06-30';



SELECT DISTINCT
title
FROM
Content
INNER JOIN
TVProgram ON Content.content_id = TVProgram.content_id
WHERE
kids_content = 'Y'
AND (MONTH(program_date) , YEAR(program_date)) = (6 , 2020);