blob_id stringlengths 40 40 | language stringclasses 1
value | repo_name stringlengths 5 133 | path stringlengths 3 276 | src_encoding stringclasses 33
values | length_bytes int64 23 9.61M | score float64 2.52 5.28 | int_score int64 3 5 | detected_licenses listlengths 0 44 | license_type stringclasses 2
values | text stringlengths 23 9.43M | download_success bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|
cb10a9e816f684743dfc2af593dcdd8f719ab598 | SQL | LEESOYEON-DEV/web-sosohotel | /WebContent/resources/sql/sosohotel_command.sql | UTF-8 | 1,368 | 3.375 | 3 | [] | no_license | # WebProject_sosohotel 연동 DB 자주 쓰는 명령어
USE sosohotel;
SHOW TABLES;
DESC member;
DESC room;
DESC reservation;
DESC payment;
DESC room_counter;
DESC refund;
SELECT * FROM member;
SELECT * FROM room;
SELECT * FROM reservation;
SELECT * FROM payment;
SELECT * FROM room_counter;
SELECT * FROM refund;
SELECT * FROM notice... | true |
7b48517c62fa744c4464867b8b8a47c462a4dbfd | SQL | yashdhawan250/Hospital-Management-System | /Hospital-Management-System.sql | UTF-8 | 1,403 | 3.265625 | 3 | [] | no_license |
--Hospital Mangement System--
--Employee Table
create table employee (
eid varchar2(5) primary key ,
ename varchar2(10),
eaddress varchar2(10),
ecno number(10),
ejob varchar2(10),
esal number(6));
--Patient Table
create table patient (
pid varchar2(5) primary key ,
eid varchar2(5) references employee(eid),
name ... | true |
7529879a516c1e3f8b999ea207ff070e067bce96 | SQL | CaelumAulas/aceleratw-turma3-grupo2-api | /src/main/resources/data_old.sql | UTF-8 | 631 | 2.9375 | 3 | [] | no_license | -- noinspection SqlNoDataSourceInspectionForFile
-- noinspection SqlDialectInspectionForFile
TRUNCATE TABLE brands
RESTART IDENTITY cascade;
-- insert into brands("name")
-- values ('marca 1'),
-- ('marca 2'),
-- ('marca 3');
TRUNCATE TABLE users
RESTART IDENTITY cascade;
-- INSERT INTO users ("name", "password")
-... | true |
5d1d1b44e582d765c9d982ea55557d75d63ad554 | SQL | infoshareacademy/jdszr2-DataResearchers | /sql/scripts/veterans script.sql | UTF-8 | 908 | 3.65625 | 4 | [] | no_license | select party,
round(avg(veterans_factor),2) as AVG,
round(percentile_disc(0.25) within group (order by veterans_factor),2) as Q1,
round(mode() within group (order by veterans_factor),2) as MEDIAN,
round(percentile_disc(0.75) within group (order by veterans_factor),2) as Q3,
round(stddev(veterans_factor),2) as STD
... | true |
e257a00771a87c5d2ea2e716c9822ec7b25cfcc2 | SQL | TCFSTeam/tcfs-play | /conf/evolutions/default/1.sql | UTF-8 | 3,811 | 3.46875 | 3 | [] | no_license | # --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table menu_item (
id integer not null,
item_price double,
is_deleted boolean,
item_description varchar(255),
constraint pk... | true |
8c27f736cf46dc12ac4414a46bf0983860ff76d8 | SQL | lianglee123/leetcode | /101~200/191~200/197.rising_temperature.sql | UTF-8 | 130 | 2.859375 | 3 | [] | no_license | SELECT
w1.Id
FROM
weather w1,
weather w2
WHERE w1.Temperature > w2.Temperature AND DATEDIFF(w1.RecordDate, w2.RecordDate)=1
| true |
9049af8ddc282cd35150ce62fd8d5f6af9c0cfcc | SQL | Sid2914/Sasawa | /database/sasawa.sql | UTF-8 | 5,660 | 3.09375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 12, 2020 at 01:39 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
8a9745b872e3deaf1a5f83626d0880ecc99e9a8a | SQL | romagny13/EasyDb | /EasyDbLib.Tests/mysql.sql | UTF-8 | 2,188 | 3.28125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Client : 127.0.0.1
-- Généré le : Lun 05 Juin 2017 à 18:40
-- Version du serveur : 5.7.14
-- Version de PHP : 5.6.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_S... | true |
5653ba456673a8e71e86b2faf1583d2bb4f3e4a1 | SQL | Axichaos/SE-PROPERTY-MANAGEMENT-SYSTEM | /127_0_0_1 (7).sql | UTF-8 | 31,131 | 3.421875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 01, 2019 at 08:21 PM
-- Server version: 10.1.34-MariaDB
-- PHP Version: 7.2.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
6f7c2350013969e23bd41f1666e469931fc92de7 | SQL | lijymil7/taekwondo | /ref/schema/mysql/01. createUser.sql | UTF-8 | 1,052 | 2.65625 | 3 | [] | no_license | -- PROD
CREATE DATABASE TAEKWONDO_PROD CHARACTER SET='utf8mb4' COLLATE='utf8mb4_unicode_ci';
CREATE USER taekwondo_prod IDENTIFIED BY 'taekwondo_prod';
GRANT ALL PRIVILEGES ON TAEKWONDO_PROD.* TO 'taekwondo_prod'@'%' WITH GRANT OPTION;
ALTER USER 'taekwondo_prod'@'%' IDENTIFIED WITH mysql_native_password BY 'tae... | true |
a318fe6b6c61dd55d3b1ba211fad4bc2725f3011 | SQL | ninofelino/nuansa | /controllers/db.sql | UTF-8 | 1,377 | 3.640625 | 4 | [] | no_license | -- View: public.felino_dbinv
-- DROP VIEW public.felino_dbinv;
CREATE OR REPLACE VIEW public.felino_dbinv AS
SELECT min(t.barcode::text) AS id,
t.article,
t.list_prc,
t.sale_price,
count(*) AS count,
json_agg(json_build_object('default_code', t.barcode, 'attribute_value_ids', t.ukuran) ORDER BY ... | true |
46e93c932ac928e173bffd82eac887622e0597b2 | SQL | YashasvyPyaraka/doctor | /test/peoples_doctor.sql | UTF-8 | 7,289 | 3.40625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 3.5.8.1deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Sep 11, 2013 at 05:14 PM
-- Server version: 5.5.31-0ubuntu0.13.04.1
-- PHP Version: 5.4.9-4ubuntu2
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
ba6d951fc29d385d7e210fc6a0b38c239cb9c399 | SQL | lizozavr/Applications-API | /src/main/resources/data.sql | UTF-8 | 489 | 2.828125 | 3 | [] | no_license | DROP TABLE IF EXISTS applications;
CREATE TABLE applications (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(128) NOT NULL,
version VARCHAR NOT NULL,
content_rate INT NOT NULL
);
INSERT INTO appl... | true |
888197b85c8f6d12c1cd6d843d35c3b02e049a11 | SQL | Abhi-sigma/logs-analysis | /create_view.sql | UTF-8 | 788 | 3.859375 | 4 | [] | no_license | create or replace view popular_article as
select articles.title as title,authors.name as name,
count(articles.title) as views from articles,log,authors
where articles.author=authors.id and log.path = '/article/' || articles.slug
group by articles.title,authors.name order by views desc;
create or replace... | true |
323a5657ed3c5318ecde5d98072da62cbfbb8860 | SQL | Sayantoni1/sparks_bank | /the-sparks-foundation/sql/sparks_bank.sql | UTF-8 | 2,755 | 3.359375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 19, 2021 at 05:32 PM
-- Server version: 10.4.20-MariaDB
-- PHP Version: 8.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
52b715757a49d61a2389d944aecc2593e4b97244 | SQL | Aylin241/-bungen | /Tut_alt/übung3.sql | UTF-8 | 637 | 3.296875 | 3 | [] | no_license | --Ermittle, warum du INSERT-Rechte auf die Tabelle SCOTT.EMP und UPDATE-Rechte auf die Tabelle SCOTT.DEPT besitzt.
--Wurden die Tabellen-Rechte direkt an dich bzw. an PUBLIC vergeben?
SELECT Grantee, Privilege
FROM ALL_TAB_PRIVS
WHERE TABLE_SCHEMA= 'SCOTT' AND TABLE_NAME in ('EMP', 'DEPT'); --Die Rechte wurden an P... | true |
52fa82071dd91fa55ea491e2fd824f6eebc78fd3 | SQL | mrdatawolf/Colonization | /SQL/main_server_types.sql | UTF-8 | 338 | 3.203125 | 3 | [
"MIT"
] | permissive | create table server_types
(
id INTEGER
constraint system_types_pk
primary key autoincrement,
title text not null
);
create unique index system_types_id_uindex
on server_types (id);
INSERT INTO server_types (id, title) VALUES (1, 'planet');
INSERT INTO server_types (id, title) VALUES... | true |
eeba574695bee2855a3f5541fac2d7540135f171 | SQL | marloVGulik/manege | /framework.sql | UTF-8 | 5,162 | 3.203125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Gegenereerd op: 14 jun 2020 om 17:29
-- Serverversie: 10.4.11-MariaDB
-- PHP-versie: 7.4.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR... | true |
fc5ff88e4e0a60f262b8311d87569a733884494a | SQL | figoxu/egghead_window_functions | /005_ntile/window.sql | UTF-8 | 399 | 3.046875 | 3 | [] | no_license | -- ntiles defined by number of buckets
--
SELECT
school,
internet,
g3 AS final_grade,
MAX(g3) OVER (PARTITION BY school) AS max_final_grade,
ntile(100) OVER (PARTITION BY school ORDER BY g3) AS percentile
FROM students;
SELECT
school,
internet,
g3 AS final_grade,
MAX(g3) OVER (PARTITION BY school) AS max_final_grad... | true |
2d172dc694437e0676d80e9e0adda42a447093cf | SQL | leohnardo/prevcolo | /db/prevcolo (2).sql | UTF-8 | 84,195 | 3.03125 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 10-Out-2018 às 04:41
-- Versão do servidor: 10.1.30-MariaDB
-- PHP Version: 7.2.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
ee18faf8f4e0fcd7c604a06ec21b06718350cc39 | SQL | FGLimited/Lorifico | /lorenzoDB.sql | UTF-8 | 8,040 | 2.90625 | 3 | [] | no_license | -- MySQL dump 10.13 Distrib 5.7.18, for Linux (x86_64)
--
-- Host: flow3rhouse.duckdns.org Database: LorenzoDB
-- ------------------------------------------------------
-- Server version 5.7.18
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET... | true |
f4890eb92589427a5a63add4fbbb060953cdf56d | SQL | meldig/SQL | /schema/structure commune/creation_ta_iris_geom.sql | UTF-8 | 1,252 | 3.625 | 4 | [] | no_license | /*
Creation de la table G_GEO.TA_IRIS_GEOM qui recense les zones IRIS.
*/
-- 1. Création de la table
CREATE TABLE G_GEO.TA_IRIS_GEOM(
objectid NUMBER(38,0) GENERATED BY DEFAULT AS IDENTITY START WITH 1 INCREMENT BY 1,
GEOM SDO_GEOMETRY
);
-- 2. Création des commentaires des colonnes
COMMENT ON TABLE G_GEO.TA_IRIS_G... | true |
230c7d6ac53ed4057f03ba156766b6aa4d863be7 | SQL | Blackkkkkkk/youhe | /SQL/sql_shrio.sql | UTF-8 | 3,172 | 3.59375 | 4 | [] | no_license | DROP TABLE IF EXISTS `sys_permission`;
CREATE TABLE `sys_permission` (
`mid` int(11) NOT NULL AUTO_INCREMENT,
`mname` varchar(255) DEFAULT NULL,
PRIMARY KEY (`mid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of module 权限表
-- ----------------------------
INSE... | true |
69d9ec3398c432bdf97ecd9987036c9300536af3 | SQL | Supermewjx/medical-care | /数据库/hospital.sql | UTF-8 | 9,240 | 3.375 | 3 | [] | no_license | /*
Navicat MySQL Data Transfer
Source Server : MYSQL
Source Server Version : 50527
Source Host : localhost:3306
Source Database : hospital
Target Server Type : MYSQL
Target Server Version : 50527
File Encoding : 65001
Date: 2021-03-07 11:54:35
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----... | true |
a493d0fa55b35b74844696d40cd20b586e91effe | SQL | redsnapper2006/leetcode-cn | /B/1587-bank-account-summary-ii/main.sql | UTF-8 | 153 | 3.75 | 4 | [] | no_license | SELECT
u.name,
sum(t.amount) as balance
FROM
Users u,
Transactions t
WHERE
u.account = t.account
GROUP BY
u.account
HAVING
balance > 10000
| true |
81eba1c195ae061cf26219defc8b1274136e87dd | SQL | RezaNurRochmat13/masteraset | /aset.sql | UTF-8 | 8,238 | 2.8125 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.3.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Nov 28, 2016 at 03:46 AM
-- Server version: 5.6.24
-- PHP Version: 5.6.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... | true |
3720c9df233a1e4c0c57d8fbb94ae83c0f767c6a | SQL | odysseusinc/MethodEvaluation | /inst/sql/sql_server/CreateOmopHois.sql | UTF-8 | 7,204 | 3.734375 | 4 | [
"Apache-2.0"
] | permissive | /************************************************************************
Copyright 2020 Observational Health Data Sciences and Informatics
This file is part of MethodEvaluation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obt... | true |
f6ac78ffe61e8299e499478c0f71850b79bb3a0a | SQL | JijinJayakumar/slimoop | /slimoop.sql | UTF-8 | 2,600 | 3.234375 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Sep 17, 2018 at 05:02 AM
-- Server version: 5.7.19
-- PHP Version: 7.2.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... | true |
d8b6e51a15a8adbcae51b802eb3e29292ec466d7 | SQL | MaiconCanedo/curso-jdbc-devmedia2.0 | /backup_do_banco/PostgreSQL/criando_banco_curso.sql | UTF-8 | 1,936 | 3.625 | 4 | [] | no_license | CREATE TABLE public.endereco (
id_endereco serial NOT NULL,
id_estado integer NOT NULL,
cep integer NOT NULL,
ativo integer DEFAULT 1 NOT NULL,
numero integer NOT NULL,
logradouro character varying(150) NOT NULL,
bairro character varying(45)
);
CREATE TABLE public.estado (
id_estado int... | true |
ee492f613cd1b903bfec7a1229da7044949a38c2 | SQL | jeromnik5/demo | /db.sql | UTF-8 | 1,362 | 2.9375 | 3 | [] | no_license |
DROP DATABASE IF EXISTS TEST;
CREATE DATABASE test;
USE test;
DROP TABLE IF EXISTS `test`.`user`;
CREATE TABLE USER (
`ID` INT(8) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(40) NOT NULL,
`age` INT(3) NOT NULL,
`is_admin` TINYINT(1) NOT NULL DEFAULT '0',
`created_date` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
... | true |
aa034c251e73208433442fdee8ea84c8a359772d | SQL | nieaowei/gateway | /sql/go_gateway_admin.sql | UTF-8 | 817 | 2.65625 | 3 | [] | no_license | create table admin
(
id bigint auto_increment comment '自增id'
primary key,
username varchar(255) default '' not null comment '用户名',
salt varchar(50) default '' not null comment '盐',
password varchar(255) default '' not null comment '... | true |
8932a89ed5011ba8ff9afc74cfdfbaf4a8ad9d4a | SQL | cssat/sql_dev | /test_annie/Stored Procedures 1566 and 1774/sp_mp_adoption.sql | UTF-8 | 393 | 3.203125 | 3 | [] | no_license |
DROP PROCEDURE `test_annie`.`sp_mp_adoption`;
DELIMITER $$
CREATE DEFINER=`test_annie` PROCEDURE `sp_mp_adoption`(p_date varchar(3000))
BEGIN
SELECT
CONVERT(CONCAT(state_fiscal_yyyy, '-07-01'), DATETIME) AS 'Fiscal Year/Year Child Became Legally Free'
,old_region_cd AS 'Region'
,ROUND(perc_adopt * 100, 2) AS 'Per... | true |
a7da2485a3926ddfdf17eaba3756c94303ab3838 | SQL | iuri/projop | /packages/acs-content-repository/sql/oracle/content-package.sql | UTF-8 | 1,192 | 2.984375 | 3 | [] | no_license | -- Data model to support content repository of the ArsDigita
-- Publishing System
-- Copyright (C) 1999-2000 ArsDigita Corporation
-- Author: Karl Goldstein (karlg@arsdigita.com)
-- $Id: content-package.sql,v 1.4 2015/12/04 13:49:57 cvs Exp $
-- This is free software distributed under the terms of the GNU Public
-- ... | true |
5ed08585f1cc698bc561a8bab1aa0ff9ff1d51cd | SQL | nicknepal/MySQL-minor-prj | /assignment_queries.sql | UTF-8 | 5,346 | 4.34375 | 4 | [] | no_license | #use Rent_A_Room_House;
#---------------FROM OWNER-------------
#1. Sign Up
INSERT INTO USER (FName, LName, Email, Password)
VALUES('Nick','Shaw','nickshaw@gmail.com','nick123');
#2. Login
INSERT INTO USER (Email, Password)
VALUES ('nickshaw@gmail.com','nick123');
#3. Initizlize OWNER Profile with OwnerID = 1... | true |
3e93fc5592b6ed89a21e26850026a8fe4b4048bc | SQL | pyunji/Hyundai-ITnE-Team_QuadCore | /pyunji/sql/PR_59044.sql | UTF-8 | 657 | 4.21875 | 4 | [] | no_license | -- 1
select *
from(
SELECT i.name, i.datetime
FROM(
SELECT animal_id
FROM ANIMAL_INS
MINUS
SELECT animal_id
FROM ANIMAL_OUTS) ids, animal_ins i
where ids.animal_id = i.animal_id
order by i.datetime
)
where rownum <= 3;
--2
select *
from(
select i.name, i.da... | true |
9c36285a7b4cae99cab89c9edf4a9d44ccaff6f9 | SQL | DennisGronberg/TentaDB | /TentaDB/TentaSQL/dbo/Stored Procedures/CustomerGetOrders.sql | UTF-8 | 241 | 3.609375 | 4 | [] | no_license |
CREATE PROCEDURE CustomerGetOrders (@CustomerID NVARCHAR(5))
AS
SELECT c.CompanyName, c.ContactName, o.OrderDate
FROM Customers c
INNER JOIN Orders o ON c.CustomerID = o.CustomerID
WHERE c.CustomerID=@CustomerID
ORDER BY o.OrderDate ASC | true |
ab5b936a922813aaf9c5c45c432e125964d659bb | SQL | radtek/abs3 | /sql/mmfo/bars/Table/async_action.sql | WINDOWS-1251 | 5,331 | 3.359375 | 3 | [] | no_license |
PROMPT =====================================================================================
PROMPT *** Run *** ========== Scripts /Sql/BARS/Table/ASYNC_ACTION.sql =========*** Run ***
PROMPT =====================================================================================
PROMPT *** ALTER_POLICY_INFO... | true |
e796806dcae3a4f490aeae9884884443abae2c19 | SQL | silence-do-good/stress-test-Postgres-and-MySQL | /dump/low/day24/select0620.sql | UTF-8 | 178 | 2.609375 | 3 | [] | no_license |
SELECT timeStamp, temperature FROM ThermometerOBSERVATION o
WHERE timestamp>'2017-11-23T06:20:00Z' AND timestamp<'2017-11-24T06:20:00Z' AND temperature>=10 AND temperature<=15
| true |
9226fd13037f7997a1f64c23379ec36de416a9f3 | SQL | Hxgxn/Adventure | /data-dump.sql | UTF-8 | 5,066 | 3.046875 | 3 | [] | no_license | -- MySQL dump 10.18 Distrib 10.3.27-MariaDB, for debian-linux-gnueabihf (armv8l)
--
-- Host: localhost Database: adventure
-- ------------------------------------------------------
-- Server version 10.3.27-MariaDB-0+deb10u1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARAC... | true |
3442d88de8746880279176a2623823feab93ef83 | SQL | anupamhaldkar/wiproPBLAssignments | /7_RDBMS_SQL_JDBC/2_Restricting_Sorting_Data/14.sql | UTF-8 | 138 | 3.078125 | 3 | [] | no_license | SELECT last_name, Job_id, salary
FROM employees
WHERE (job_id=’SA_REP’ OR job_id =’ST_CLERK’) AND salary NOT IN(2500,3500,7000);
| true |
9e2a0259f719e0be2d2e309ce2c9dd0cbf9211cf | SQL | digilum/dbcopy | /buildSrc/src/main/resources/oracle/disable_triggers.sql | UTF-8 | 401 | 3.3125 | 3 | [] | no_license | begin
for c in (
select t.trigger_name, t.table_name
from user_triggers t
where t.status = 'ENABLED'
and t.table_name not like 'BIN$%'
order by t.table_name
) loop
begin
dbms_utility.exec_ddl_statement( 'alter trigger ' || c.trigger_name || ' disable' );
exception
when others then
dbms_output... | true |
b0db9d650186953f4b706d26a894feda45aec742 | SQL | sanynikonov/Tasks1-5 | /Task4/6.sql | UTF-8 | 534 | 4.25 | 4 | [] | no_license | SELECT WorkingPlaces.EmployeeName as Employee, COUNT(Tasks.State) as UnclosedTasksCount FROM WorkingPlaces, Tasks
WHERE WorkingPlaces.WorkingPlaceId = Tasks.Employee AND Tasks.State <> 'Closed'
GROUP BY WorkingPlaces.EmployeeName
HAVING COUNT(Tasks.State) = (
SELECT MIN(GroupedEmployees.UnclosedTasksCount) FROM (
S... | true |
129cd3955cae568c6da9efb095b41332b98d8fae | SQL | rubelbgdsa/API_TEST | /java/dbMicroTech Script for MySQL.sql | UTF-8 | 3,856 | 3.28125 | 3 | [] | no_license | -- DROP Database dbMicrotech;
CREATE Database dbMicrotech;
USE dbMicrotech;
CREATE TABLE tblEmployee
(
empId int PRIMARY KEY not null,
empName VarChar(50) not null,
empState Char(2) null,
empDOB Date null,
empSalary Decimal(9,2) null,
empMarried Bit null,
managerId int
);
CREATE T... | true |
9f9db425780cc3f58eec212d7281391e2d128ca1 | SQL | martindelloro/cakesurvey | /sqls/cakesurvey.sql | UTF-8 | 41,367 | 3.109375 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
-- Dumped from database version 9.3.10
-- Dumped by pg_dump version 9.3.10
-- Started on 2016-02-01 16:50:33 ART
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_mess... | true |
9f0cc2d8b838ade08454a9c9b940637bf36d41ba | SQL | opengauss-mirror/openGauss-server | /src/test/regress/sql/xc_sequence.sql | UTF-8 | 3,059 | 3.46875 | 3 | [
"LicenseRef-scancode-mulanpsl-2.0-en",
"LicenseRef-scancode-unknown-license-reference",
"PostgreSQL",
"BSD-3-Clause",
"LGPL-2.0-or-later",
"LicenseRef-scancode-unicode",
"LicenseRef-scancode-warranty-disclaimer",
"curl",
"GPL-1.0-or-later",
"LGPL-2.1-or-later",
"LGPL-2.1-only",
"CC-BY-4.0",
... | permissive | --
-- XC_SEQUENCE
--
-- Check of callback mechanisms on GTM
-- Sequence DROP and CREATE
-- Rollback a creation
START TRANSACTION;
CREATE SEQUENCE xc_sequence_1;
SELECT nextval('xc_sequence_1'); -- ok
ROLLBACK;
SELECT nextval('xc_sequence_1'); -- fail
-- Commit a creation
START TRANSACTION;
CREATE SEQUENCE xc_sequence_... | true |
de0765cf0aca416ed715bc8732e566694c4fa3c5 | SQL | Ju-Souza/Projeto-Volt-Solar | /Volt Solar.sql | UTF-8 | 810 | 3.09375 | 3 | [] | no_license | create database VoltSolar;
use VoltSolar;
create table Usuário(
idUsuario int primary key auto_increment,
Nome varchar(40),
CPF char(11),
fkCNPJ int,
foreign key (fkCNPJ) references Empresa(CNPJ)
)auto_increment = 1;
insert into Usuário values
();
create table Empresa(
CNPJ int primary key,
Nome varchar(40),
Telefone... | true |
f9588c704b63ad28938fd35949d138bba87145f4 | SQL | ainochu/subscription-service | /subscription-database/script.sql | UTF-8 | 428 | 3.234375 | 3 | [] | no_license | USE subscription_db;
CREATE TABLE IF NOT EXISTS subscription (
newsletter_id bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
email VARCHAR(100) NOT NULL,
first_name VARCHAR(45),
agree TINYINT NOT NULL DEFAULT 0,
gender ENUM('MALE', 'FEMALE') NULL DEFAULT 'MALE',
date_of_birthday DATE NOT NULL,
campaign_id b... | true |
653807b2ced874c9713a0f6eea2c07b7b1d1d2ab | SQL | andrewwoods/null-pattern-talk | /sql/load-user-tbl-data.sql | UTF-8 | 1,395 | 2.546875 | 3 | [] | no_license |
INSERT INTO user (
login,
email,
password,
firstname,
lastname
) VALUES (
'bonnie',
'bonnie.barstow@knightindustries.com',
SHA1('i designed and built KITT!'),
'Bonnie',
'Barstow'
);
INSERT INTO user (
login,
email,
password,
firstname,
lastname
)... | true |
ce8488b5d0244bda0d08de42d6a859273cbd177a | SQL | Usama809/SQL-Server | /50-Updateable Common Table Expression.sql | UTF-8 | 690 | 3.5 | 4 | [] | no_license |
Select * from tbIEmployee3
Select * from tbIDepartment1
--CTE on one base table
With Employee_Name_Gender
as
( Select Id,Name, Gender
from tbIEmployee3
)
Select * from Employee_Name_Gender
--Update
With Employee_Name_Gender
as
( Select Id,Name, Gender
from tbIEmployee3
)
Update Employee_Na... | true |
baa2c5cface811c562ca09d0102e6efc907f5d70 | SQL | syednoor1995/Typescript-Graphql | /prisma/migrations/20210915133205_product_change/migration.sql | UTF-8 | 364 | 2.65625 | 3 | [
"MIT"
] | permissive | /*
Warnings:
- You are about to drop the column `quantity` on the `Product` table. All the data in the column will be lost.
- You are about to drop the column `sku` on the `Product` table. All the data in the column will be lost.
*/
-- DropIndex
DROP INDEX "Product_sku_key";
-- AlterTable
ALTER TABLE "Product"... | true |
c361f1ee9f526596cab3f33a05c2a7e62e60a487 | SQL | ShalikaAshan01/Kushi-Bridal-and-Salon-Management-System | /SalonManagementSystem.sqlite.sql | UTF-8 | 6,396 | 3.078125 | 3 | [
"MIT"
] | permissive | BEGIN TRANSACTION;
CREATE TABLE IF NOT EXISTS `payment_installment` (
`aid` INTEGER,
`remainingPaymentt` REAL,
PRIMARY KEY(`aid`)
);
INSERT INTO `payment_installment` VALUES (6,0.0);
INSERT INTO `payment_installment` VALUES (10,12500.0);
CREATE TABLE IF NOT EXISTS `package_service` (
`pid` int,
`sid` int,
CONSTRA... | true |
4e7b992b7f39db306bd3595e757ab0cace4e20df | SQL | igorbragaia/algorithms | /interviewbit/Sql-Programming/Short-Films.sql | UTF-8 | 620 | 3.9375 | 4 | [] | no_license | select
movies.movie_title as movie_title,
movies.movie_year as movie_year,
concat(directors.director_first_name, directors.director_last_name) as director_name,
concat(actors.actor_first_name, actors.actor_last_name) as actor_name,
movies_cast.role as role
from
movies
join movies_cast on mo... | true |
63b3404c2e60d48723cf16e33b72413d71326209 | SQL | ligzy/framework | /framework-web/src/main/java/com/fccfc/framework/web/dao/AreaDao_selectAreaByMemberId.sql | UTF-8 | 182 | 3.109375 | 3 | [] | no_license | SELECT A.* FROM AREA A, MEMBER_GROUP MG, MEMBER_MEMBER_GROUP MMG
WHERE A.AREA_ID = MG.AREA_ID
AND MG.GROUP_ID = MMG.GROUP_ID
AND A.AREA_TYPE = 'O'
AND MMG.MEMBER_ID = :memberId
| true |
5a1e843ec65893181e98f37fc5c0896097ce19e8 | SQL | cenan/bugtracker | /db/migrations/1_categories_up.sql | UTF-8 | 796 | 3.703125 | 4 | [] | no_license | BEGIN TRANSACTION;
CREATE TABLE category (
id integer primary key,
category_name varchar(255),
default_assignee_id integer
);
INSERT INTO category (id, category_name) VALUES (0, 'None');
ALTER TABLE issue ADD COLUMN category_id integer default 0;
ALTER TABLE issue_update ADD COLUMN old_category integer default ... | true |
3a54cc18c3871b5ee2427379f9d14c48716f0c0d | SQL | RobMcZagBDS/sample_wh | /models/dwh/DATE_CALENDAR.sql | UTF-8 | 3,653 | 3.84375 | 4 | [] | no_license | /*
Calendar Weeks and Weekdays
https://docs.snowflake.com/en/sql-reference/functions-date-time.html#label-calendar-weeks-weekdays
The behavior of week-related functions in Snowflake is controlled by the WEEK_START and WEEK_OF_YEAR_POLICY session parameters.
-- ALTER SESSION SET WEEK_START = 1 ; -- set... | true |
9ef8431d9c39f60d3f774cd87e5e09223b81d2af | SQL | OPAdmin-dev/OrdinaryPlaylists | /OP.sql | UTF-8 | 61,845 | 3 | 3 | [] | no_license | --
-- PostgreSQL database dump
--
-- Dumped from database version 10.14 (Ubuntu 10.14-1.pgdg18.04+1)
-- Dumped by pg_dump version 12.4 (Ubuntu 12.4-1.pgdg18.04+1)
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings... | true |
e2123a19c5fea178de0beca01074a60ba8ca58bd | SQL | Sandipghosh98/Online-Voting-System | /voting.sql | UTF-8 | 7,338 | 2.859375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 22, 2019 at 01:28 PM
-- Server version: 10.1.28-MariaDB
-- PHP Version: 7.1.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
956d1b8c1274f7a2420608bfdd0345a3ed99c606 | SQL | doanvanvinhtho/simple-rest-api-by-gingonic-gin | /repository/mysql/event_mysql.sql | UTF-8 | 436 | 3.078125 | 3 | [] | no_license | USE demo;
DROP TABLE IF EXISTS `event`;
CREATE TABLE `event` (
`id` varchar(30) NOT NULL,
`title` varchar(100) NOT NULL,
`description` varchar(500) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO event (`id`, `title`, `description`) VALUES ("id_go", "Go", "https://golang.org/... | true |
37a8fb3e2709bb8e73ccbda561a7d01028b8710f | SQL | hw233/yxjxmk-java | /服务器运行环境/mysql/querydb.sql | UTF-8 | 1,306 | 2.96875 | 3 | [] | no_license | /*
SQLyog Trial v9.30
MySQL - 5.5.20 : Database - querydb
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_K... | true |
61a91f14e9ad03ccf70f09e834d999358a435a17 | SQL | wulianonline/tk-mybatis-custom | /db/db1.sql | UTF-8 | 760 | 3.171875 | 3 | [] | no_license |
CREATE DATABASE IF NOT EXISTS `tkmybatisdb1` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ;
USE `tkmybatisdb1`;
/*Table structure for table `user` */
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` bigint(13) unsigned NOT NULL AUTO_INCREMENT,
`user_name` varchar(20) COLLATE utf8mb4_bin DEFAULT NUL... | true |
a67718054a473239195e57d1006e50d46ceea4a9 | SQL | neurotech/edumate-canvas-sync | /sql/view_canvas_life_skills_enrolments.sql | UTF-8 | 963 | 3.984375 | 4 | [] | no_license | CREATE OR REPLACE VIEW DB2INST1.VIEW_CANVAS_LIFE_SKILLS_ENROLMENTS (
course_id,
root_account,
user_id,
role,
section_id,
status,
associated_user_id
) AS
WITH current_students AS (
SELECT student_id
FROM TABLE(EDUMATE.get_currently_enroled_students(current date))
),
life_skills_enrolments AS (
SELE... | true |
9a77e328df277169b85a9cb53b1b7495ea2ec3fd | SQL | Simo/farmaweb | /src/main/resources/schema.sql | UTF-8 | 967 | 3.40625 | 3 | [] | no_license |
--ALTER TABLE PRESCRIZIONE DROP CONSTRAINT FK_ANAG_ID;
--ALTER TABLE PRESCRIZIONE DROP CONSTRAINT FK_ITEM_ID;
--DROP TABLE ANAGRAFICA;
CREATE MEMORY TABLE ANAGRAFICA (
ID INTEGER IDENTITY PRIMARY KEY,
NOME VARCHAR(256) NOT NULL,
COGNOME VARCHAR(256) NOT NULL,
EMAIL VARCHAR(256) NULL
);
--DR... | true |
dbef7fe649d8e5f66a369b7f4a2bd3562249e195 | SQL | WowleraTV10205/Police-Department | /SQL/Police Department.sql | UTF-8 | 4,694 | 3.546875 | 4 | [] | no_license | -- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTI... | true |
3f41088cfe91d9609fc4961292f8fc8b5d6a9630 | SQL | RyujiOdaJP/progate | /SQL/dojo1/page10/exercise2.sql | UTF-8 | 262 | 3.578125 | 4 | [] | no_license | -- 売上額が上位5位の商品の指定されたデータを取得してください
SELECT items.id, items.name, SUM(price) AS '売上額'
FROM sales_records
JOIN items
ON sales_records.item_id = items.id
GROUP BY items.id
ORDER BY SUM(price) DESC
LIMIT 5
; | true |
1139efc7d7270bf6675a7b773a4b944bafb63627 | SQL | TakashiKatsuo/min_mya_thi_baibao_ecommerce_system_pure_php | /baibao_db.sql | UTF-8 | 20,326 | 3.234375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Sep 27, 2020 at 09:33 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... | true |
9763ca4348c74beefae8df81987e75b243ca4c2d | SQL | NikPikhmanets/BicycleRacing | /src/main/resources/db/migration/V20190331174510__create_waypoint_table.sql | UTF-8 | 221 | 2.828125 | 3 | [] | no_license | CREATE TABLE waypoint
(
id SERIAL NOT NULL
CONSTRAINT waypoint_pkey PRIMARY KEY,
latitude DOUBLE PRECISION,
longitude DOUBLE PRECISION,
date TIMESTAMP,
track_id INTEGER REFERENCES track (id)
); | true |
bfc864770d84320b0f39dfe85482f241ef2ed6ef | SQL | GeoHistoricalData/historical_geocoding | /example/example_of_loading_data/loading_new_historical_adress_data/loading_ehess_data.sql | UTF-8 | 11,243 | 3.171875 | 3 | [
"MIT"
] | permissive | ------------------------
-- Remi Cura, 2016 , Projet Belle Epoque
------------------------
-- load the data collected by maurizio gribaudi from ehess
DROP SCHEMA IF EXISTS ehess_data;
CREATE SCHEMA IF NOT EXISTS ehess_data ;
SET search_path to ehess_data, public ;
-- starting by loading professiono data at 3 ... | true |
7d5be02678925261092c5ea51cbbbf25404d7072 | SQL | linkem97/holbertonschool-machine_learning | /pipeline/0x02-databases/103-average_weighted_score.sql | UTF-8 | 535 | 3.734375 | 4 | [
"MIT"
] | permissive | -- This script creates a stored procedure ComputeAverageWeightedScoreForUser
-- that computes and store the average weighted score for a student.
DELIMITER $$
CREATE PROCEDURE ComputeAverageWeightedScoreForUser (
IN new_user_id INTEGER)
BEGIN
UPDATE users SET average_score=(SELECT SUM(weight * score) / SUM(we... | true |
3a6ef1b6f965ca3e92b304e70ca8f604608f735c | SQL | qinzp123/Student-SignIn-Manager-System | /src/main/resources/static/SQL/数据库结构.sql | UTF-8 | 3,813 | 3.515625 | 4 | [] | no_license | /*
Navicat Premium Data Transfer
Source Server : 腾讯云Mysql
Source Server Type : MySQL
Source Server Version : 50718
Source Host : db.wtu.hll520.cn:10105
Source Schema : test
Target Server Type : MySQL
Target Server Version : 50718
File Encoding : 65001
Date: 19/12/202... | true |
52cf949418c5ceedc9d930a47f32d9963624a722 | SQL | aghose/ConnectFood | /server/database/tables/food-listing/food-type.sql | UTF-8 | 2,322 | 3.546875 | 4 | [] | no_license | /* A domain table that holds all possible hard-coded short hand food type descriptions.
* Should be used to populate some form item such as a combobox for selection.
* We may be able to get data from an online database for this in the future...
*/
--DROP TABLE FoodType CASCADE;
CREATE TABLE IF NOT EXISTS FoodTyp... | true |
e5b540882f1f073aff6e320d091b7947aadff970 | SQL | yangruihan/raspberrypi | /java/UserManagementJPro/db/userdb.sql | UTF-8 | 362 | 2.859375 | 3 | [] | no_license | create table t_user
(
id int PRIMARY KEY AUTO_INCREMENT, #用户编号
username varchar(50) NOT NULL, #用户名
password varchar(50), #密码
role int DEFAULT 2, #用户类型 1 表示管理员 2 表示普通用户
del int DEFAULT 0 #删除位 0 表示未删除 1 表示已删除
);
insert into t_user values(1,'admin','admin',1,0); | true |
f755b80d27212a63c96689fa81e7856340bdd442 | SQL | ch93/baiduMap | /sql/gpsdata/createClusteredPoint.sql | UTF-8 | 575 | 2.90625 | 3 | [] | no_license |
-- 创建 gpsdata 数据库
-- CREATE DATABASE gpsdata;
-- 创建 clusteredpoint表
DROP TABLE IF EXISTS clusteredpoint;
CREATE TABLE clusteredpoint (
userid int(11) DEFAULT NULL,
lat double DEFAULT NULL,
lngt double DEFAULT NULL,
arvT timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
levT timestamp... | true |
ee6fe0b950854bc5da634b97b5a8bc151ef9dcf9 | SQL | zxteamorg/node.sql-postgres | /test.files/MigrationManager_1/v2/install/10-init.sql | UTF-8 | 485 | 3.84375 | 4 | [] | no_license | CREATE TABLE "subscriber"
(
"id" SERIAL NOT NULL PRIMARY KEY,
"subscriber_uuid" UUID NOT NULL,
"topic_id" INT REFERENCES "topic"("id") NOT NULL,
"utc_create_date" TIMESTAMP WITHOUT TIME ZONE NOT NULL DEFAULT (NOW() AT TIME ZONE 'utc'),
"utc_delete_date" TIMESTAMP WITHOUT TIME ZONE NULL,
CONSTRAINT "uq__subscriber... | true |
46d710082f51b915b64fea4a75b5c81362b5a907 | SQL | evrimulgen/Oracle-DBA-Life | /SCRIPTS/dd_cache.sql | UTF-8 | 939 | 2.78125 | 3 | [
"MIT"
] | permissive | REM FILE NAME: dd_cache.sql
REM LOCATION: Database Tuning\Shared Pool Reports
REM FUNCTION: Generate report to show Data Dictionary cache condition
REM TESTED ON: 7.3.3.5, 8.0.4.1, 8.1.5, 8.1.7, 9.0.1
REM PLATFORM: non-specific
REM REQUIRES: v$rowcache
REM
REM This is a part of the Knowledge Xpert for Oracle... | true |
fe650337de1b3be1ae3561ed7f0a9d63f5dd1538 | SQL | AlbertFrancishingu/AlbertFrancishingu | /unique_academy/users.sql | UTF-8 | 2,583 | 2.734375 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 07, 2021 at 07:24 AM
-- Server version: 10.1.34-MariaDB
-- PHP Version: 7.2.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... | true |
c97c738d96bf13955ff8adbc39b855d488ad84df | SQL | Clinical-Medical-Physics/ImageShifts | /SQL_Scripts/getPatientPlan.sql | UTF-8 | 1,528 | 3.875 | 4 | [] | no_license | --this file will return parts of the patient plan that was delivered during a date range
--python code that calls this file should replace the following items
-- strtdate
-- enddate
-- patientId
--Notes on returned values
-- [index] Label
-- 8 Iso X
-- 9 iso Y
-- 10 Iso Z
select distinct RadiationHstry.TreatmentStartTi... | true |
5cc523783c2dc68c3edacbde35f0d0e9c872b56a | SQL | TonyKartony/BI-Lab-2017 | /_2. ETL/Tasks/Aksana_Kuratnik/Task 04/EXPLICIT CURSOR.sql | UTF-8 | 1,065 | 3.46875 | 3 | [] | no_license | PROCEDURE insert_table_payment_methods
IS
CURSOR my_cursor
IS
SELECT payment_method_id,
payment_method_name AS payment_method,
start_dt,
end_dt,
is_active
FROM wrk_payment_methods
WHERE payment_method_name IS NOT NULL
AND start_dt IS NOT NULL;
pm_my_cursor cls_... | true |
400c74764b4ab60740df2b01bf0116140ebeb0ff | SQL | SijmenHuizenga/BIEB | /sql/query_gewas_geschiktheid.sql | UTF-8 | 900 | 3.046875 | 3 | [
"MIT"
] | permissive | drop table public.gewas_geschiktheid
create table public.gewas_geschiktheid ( geometry, bodemtype, klimaatzone, gewas, economische_waarde )
as
select ST_intersection ( ST_Transform(t1.geom,3857), t2.geom ), t1.omschrijvi, t2.cls, 'aardbei' , 100
from public.bodem t1,
public.klimaatdata t2
where ST_intersects ( ST_T... | true |
0502045d585e0db5e7463aa1178b139c4526ed64 | SQL | lpoaura/geonature4lpo | /04a_redlists.sql | UTF-8 | 2,896 | 3.734375 | 4 | [] | no_license | SET ROLE geonatadmin
;
CREATE TABLE taxonomie.bib_c_redlist_categories
(
code_category VARCHAR(2) PRIMARY KEY,
sup_category VARCHAR(30),
threatened BOOLEAN DEFAULT FALSE,
priority_order INT,
name_fr VARCHAR(100),
desc_fr VARCHAR(254),
name_en VARCHAR(100),
de... | true |
404244d8b670ba796184227cdc254245f4ce82cf | SQL | rnsmit06/Portfolio | /CIS 310/A10P2.sql | UTF-8 | 1,323 | 3.25 | 3 | [] | no_license | --A10P2
CREATE TABLE PILOT_DIM
(
PILOT_ID INT NOT NULL IDENTITY,
EMP_NUM INT,
EMP_FNAME VARCHAR(15),
EMP_LNAME VARCHAR(15)
)
ALTER TABLE PILOT_DIM
ADD CONSTRAINT PK_PILOT_DIM PRIMARY KEY(PILOT_ID)
CREATE TABLE AIRCRAFT_DIM
(
AC_ID INT NOT NULL IDENTITY,
AC_NUMBER VARCHAR(5),
MOD_CODE VARCHA... | true |
9f8f3e5fac3f83c34ab917e7840a68da2849718a | SQL | madehim/sql-ex.Solutions | /sql-ex select/28.sql | UTF-8 | 186 | 3.328125 | 3 | [] | no_license | -- Using Product table, find out the number of makers who produce only one model.
SELECT COUNT(maker) FROM
(SELECT maker FROM Product
GROUP by maker
HAVING COUNT(model)=1) x
| true |
7a04b46c18961324a2279036f3029e6384dac782 | SQL | delighted322/data-analysis-learing | /SQL/00select_basics.sql | UTF-8 | 355 | 3.40625 | 3 | [] | no_license | -- https://sqlzoo.net/wiki/SELECT_basics
-- DONE
-- 1.
select
population
from
world
where
name = 'Germany';
-- 2.
-- in
select
name,
population
from
world
where
name in ('Sweden', 'Norway', 'Denmark');
-- 3.
-- between and 包括边界值
select
name,
area
from
world
where
area betwe... | true |
7c188ff6145a6ad603415e3431ee51ec18cbf7b9 | SQL | JacobT96/Smoothstack-Assignments | /sqlexercise.sql | UTF-8 | 1,442 | 3.65625 | 4 | [] | no_license | /* Query 1 */
select bc.noOfCopies from tbl_book_copies bc, tbl_book b, tbl_library_branch lb
where bc.bookId = b.bookId and bc.branchId = lb.branchId and lb.branchName = "Sharpstown" and b.title = "The Lost Tribe";
/* Query 2 */
select bc.noOfCopies, lb.branchName from tbl_book_copies bc, tbl_book b, tbl_library_bran... | true |
bcb723cc5eebceffcd73d766c9b00586c655e014 | SQL | TheMightyPenguin/UC-CS | /Bases-de-Datos/destruir1_a.sql | UTF-8 | 518 | 2.828125 | 3 | [] | no_license | /* script para destruir la base de datos */
/* Destruir tablas secundarias */
DROP TABLE t.revision;
/* Destruir tablas primarias */
DROP TABLE t.taller;
DROP TABLE t.vehiculo;
/* destruyendo dominios */
DROP DOMAIN t.tipo_nombres;
DROP DOMAIN t.tipo_serial;
DROP DOMAIN t.tipo_precio;
DROP DOMAIN t.tipo_mantenimien... | true |
fdcc62a0962b9cc77f282f08d3405bc6473f4d06 | SQL | samwaters65/SpeechAnalyzer | /CreateTables.sql | UTF-8 | 2,758 | 3.140625 | 3 | [] | no_license |
use speechanalyzer
create table users (
UserID int NOT NULL AUTO_INCREMENT,
FirstName varchar(20) NOT NULL,
LastName varchar(20) NOT NULL,
EmailAddress nvarchar(80) NOT NULL,
UserPassword varchar(250) NOT NULL,
CreateDate datetime NOT NULL,
PRIMARY KEY(UserID),
UNIQUE(EmailAddress)
);
create table speechfact (
Sp... | true |
eaf2947cda90f43e2851a613798010ce9c523cc9 | SQL | RPI-HPC/hpcman-db | /schema/FilesystemGroupQuotas.sql | UTF-8 | 685 | 3.5625 | 4 | [] | no_license | -- File system quotas.
CREATE TABLE filesystem_group_quotas (
snuuid bigint NOT NULL REFERENCES sites
ON DELETE CASCADE
ON UPDATE CASCADE,
fsName TEXT NOT NULL,
groupName VARCHAR(16) NOT NULL,
softBlockQuota BIGINT,
hardBlockQuota BIGINT,
graceBlockQuota INTERVAL,
softFileQu... | true |
a789b8814bb4af8c214236e4a4d4c706b4f397ce | SQL | nigma1985/ebisu_uni_gear | /db/v_moves/_tst_doubles.sql | UTF-8 | 294 | 3.09375 | 3 | [] | no_license | -- this statement is meant to controll for doubles
-- this view should always be empty
SELECT * FROM (
SELECT
COUNT(id) as ids, date, "user" --, caloriesidle, lastupdate, summary, activities
FROM public.moves
GROUP BY date, "user") as query
WHERE query.ids > 1
ORDER BY query.date
;
| true |
50f24aa9e2e93cc3e0c8786bf959256640320591 | SQL | doytsujin/pixie | /src/cloud/plugin/schema/000004_create_retention_scripts_table.up.sql | UTF-8 | 1,301 | 3.3125 | 3 | [
"Apache-2.0"
] | permissive | CREATE TABLE plugin_retention_scripts (
-- org_id is the org who has this script enabled.
org_id UUID NOT NULL,
-- plugin_id is the ID of the plugin that the script is enabled for.
plugin_id varchar(1024) NOT NULL,
-- version is the version of the plugin that the script is enabled for.
plugin_version varcha... | true |
b714caf83dda62e76b967bc577dde8a16b4ecaeb | SQL | nmartosg/prova_uf2_uf3 | /nmartos_examenuf2uf3.sql | UTF-8 | 11,074 | 2.921875 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost
-- Tiempo de generación: 07-06-2021 a las 11:24:51
-- Versión del servidor: 5.7.33-0ubuntu0.16.04.1
-- Versión de PHP: 7.4.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 ... | true |
d3697c3132d7bb69ef538c39851939fc69298b31 | SQL | HugoRobineLanglois/Api01_test | /requetes.sql | UTF-8 | 1,856 | 3.4375 | 3 | [] | no_license |
-- drop table User;
-- CREATE TABLE User(
-- id_user int(10) unsigned NOT NULL auto_increment,
-- nom varchar(20),
-- adresse varchar(50),
-- telephone varchar(12) ,
-- dateCreation varchar(20),
-- statutCompte varchar(20),
-- mdp varchar(10),
-- PRIMARY KEY(id_user)
-- );
-- insert into ... | true |
d27e09d2c29c4dfc0931d79ab1a6a9e7a7f4eb8d | SQL | TchokoApps/OracleSql | /referent_31082018/Funktionen_neu.sql | ISO-8859-1 | 2,889 | 3.78125 | 4 | [] | no_license | --Arbeiten mit Funktionen
--MOD gibt des reste einer Ganzzahldivision zurck
--zeige 10% des textbestands
--arithmetische Funktionen
select
*
from emp
where mod(empno, 9) = 1;
---------------------------------------
select
power(2,10)
,power(2,-3)
from dual;
----------------------------------
--rou... | true |
f4efbe6479ba51c4670f0f2f7589e3c6c3c8a957 | SQL | hardilsingh/inventory | /inventory.sql | UTF-8 | 17,986 | 2.90625 | 3 | [
"MIT"
] | permissive | -- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 15, 2019 at 05:20 AM
-- Server version: 10.1.38-MariaDB
-- PHP Version: 7.1.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @... | true |
730c33fe3b3f1abba145dd7f8cc9ae9e5fcbd629 | SQL | photsawee/Double-Double-todolist | /Todolist V2/todolist (2).sql | UTF-8 | 3,891 | 3.265625 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 10, 2017 at 01:37 AM
-- Server version: 10.1.25-MariaDB
-- PHP Version: 5.6.31
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... | true |
d30246b4aa450be6fc00e4537109ab5a3d52b59e | SQL | KaizenLab-ScalaFP/zioAkkaHttpTemplate.g8 | /src/main/g8/src/main/resources/sql/create.sql | UTF-8 | 258 | 3.40625 | 3 | [
"CC0-1.0"
] | permissive | CREATE TABLE IF NOT EXISTS stock
(
id INT NOT NULL AUTO_INCREMENT,
value INT NOT NULL,
PRIMARY KEY(id)
);
insert into STOCK select * from (
select 1, 100 union
select 2, 50 union
select 3, 0
) x where not exists(select * from STOCK); | true |
9f5d7250138dabc43a693c897c8da61137abe384 | SQL | myluke/extjs-curd | /init.sql | UTF-8 | 2,166 | 3.109375 | 3 | [
"Apache-2.0"
] | permissive | -- MySQL Administrator dump 1.4
--
-- ------------------------------------------------------
-- Server version 5.0.45-Debian_1ubuntu3.1-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COL... | true |
1543d121ecd06ead9ff9cba65ca84be4176d9adc | SQL | lisa-lin/sql_zoo | /join.sql | UTF-8 | 2,907 | 4.5625 | 5 | [] | no_license | - 1. Matchid and player for every German goal
SELECT matchid, player
FROM goal
WHERE teamid = 'GER';
-- 2. Id, stadium, team1, and team2 for game 1012
SELECT id, stadium, team1, team2
FROM game
WHERE id = 1012;
-- 3. Player, teamid, stadium, and mdate for every German goal
SELECT goal.player, goal.teamid, game.sta... | true |
9103a1bbe673db965f4665b6c424ea89e49bf11f | SQL | bunnycodec/Green_Gas | /greengasdb/customer_register.sql | UTF-8 | 1,824 | 3.046875 | 3 | [] | no_license | -- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 10, 2018 at 06:18 PM
-- Server version: 10.1.32-MariaDB
-- PHP Version: 5.6.36
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @... | true |
506939bbda65492fd17a220ea44af491f6d6541d | SQL | Fedeaguilera94/rest-api-elpotrero | /prisma/migrations/20210928115409_/migration.sql | UTF-8 | 234 | 3.09375 | 3 | [] | no_license | -- CreateTable
CREATE TABLE "Player2" (
"id" SERIAL NOT NULL,
"username" TEXT NOT NULL,
CONSTRAINT "Player2_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX "Player2_username_key" ON "Player2"("username");
| true |
a870cbb61fce7245ad41de03066c29926ffcfcdd | SQL | kalex375/OVC | /test/3.sql | UTF-8 | 644 | 2.984375 | 3 | [] | no_license | select
sum(DBMS_UTILITY.get_hash_value(s.line,
1,
65536)
+ 2*DBMS_UTILITY.get_hash_value(s.text,
1,
65536))from
all_source s
where
s.owner='ORA_VER' and
s.type ='... | true |
11cd5863496c7849789c8e01636f429ce0809334 | SQL | LGG233/Bamazon | /schema.sql | UTF-8 | 386 | 2.75 | 3 | [] | no_license | DROP DATABASE IF EXISTS bamazon;
CREATE DATABASE bamazon;
USE bamazon;
DROP TABLE IF EXISTS products;
CREATE TABLE products(
item_id INT NOT NULL AUTO_INCREMENT,
product_name VARCHAR(50) NOT NULL,
department_name VARCHAR(50) NOT NULL,
price DECIMAL (6,2) NOT NULL,
... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.